pub trait IndraDb: Send + Sync + 'static {
    type GetStream: Stream<Item = Result<QueryOutputValue, Status>> + Send + 'static;

    // Required methods
    fn ping<'life0, 'async_trait>(
        &'life0 self,
        request: Request<()>
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sync<'life0, 'async_trait>(
        &'life0 self,
        request: Request<()>
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_vertex<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Vertex>
    ) -> Pin<Box<dyn Future<Output = Result<Response<CreateResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_vertex_from_type<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Identifier>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Uuid>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_edge<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Edge>
    ) -> Pin<Box<dyn Future<Output = Result<Response<CreateResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Query>
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Query>
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_properties<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SetPropertiesRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn bulk_insert<'life0, 'async_trait>(
        &'life0 self,
        request: Request<Streaming<BulkInsertItem>>
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn index_property<'life0, 'async_trait>(
        &'life0 self,
        request: Request<IndexPropertyRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute_plugin<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ExecutePluginRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<ExecutePluginResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with IndraDbServer.

Required Associated Types§

source

type GetStream: Stream<Item = Result<QueryOutputValue, Status>> + Send + 'static

Server streaming response type for the Get method.

Required Methods§

source

fn ping<'life0, 'async_trait>( &'life0 self, request: Request<()> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Pings the server.

source

fn sync<'life0, 'async_trait>( &'life0 self, request: Request<()> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Syncs persisted content. Depending on the datastore implementation, this has different meanings - including potentially being a no-op.

source

fn create_vertex<'life0, 'async_trait>( &'life0 self, request: Request<Vertex> ) -> Pin<Box<dyn Future<Output = Result<Response<CreateResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Creates a new vertex.

source

fn create_vertex_from_type<'life0, 'async_trait>( &'life0 self, request: Request<Identifier> ) -> Pin<Box<dyn Future<Output = Result<Response<Uuid>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Creates a new vertex with just a type specification. As opposed to CreateVertex, this is used when you do not want to manually specify the vertex’s UUID. Returns the new vertex’s UUID.

source

fn create_edge<'life0, 'async_trait>( &'life0 self, request: Request<Edge> ) -> Pin<Box<dyn Future<Output = Result<Response<CreateResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Creates a new edge.

source

fn get<'life0, 'async_trait>( &'life0 self, request: Request<Query> ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetStream>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Gets values specified by a query.

source

fn delete<'life0, 'async_trait>( &'life0 self, request: Request<Query> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Deletes values specified by a query.

source

fn set_properties<'life0, 'async_trait>( &'life0 self, request: Request<SetPropertiesRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Sets properties.

source

fn bulk_insert<'life0, 'async_trait>( &'life0 self, request: Request<Streaming<BulkInsertItem>> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Bulk inserts many vertices, edges, and/or properties.

Note that datastores have discretion on how to approach safeguard vs performance tradeoffs. In particular:

  • If the datastore is disk-backed, it may or may not flush before returning.
  • The datastore might not verify for correctness; e.g., it might not ensure that the relevant vertices exist before inserting an edge.
source

fn index_property<'life0, 'async_trait>( &'life0 self, request: Request<IndexPropertyRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Enables indexing on a specified property. When indexing is enabled on a property, it’s possible to query on its presence and values.

source

fn execute_plugin<'life0, 'async_trait>( &'life0 self, request: Request<ExecutePluginRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<ExecutePluginResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Executes a plugin and returns back the response from the plugin.

Implementors§