Skip to main content

RuntimeEntityPort

Trait RuntimeEntityPort 

Source
pub trait RuntimeEntityPort {
Show 16 methods // Required methods fn create_row( &self, input: CreateRowInput, ) -> Result<CreateEntityOutput, RedDBError>; fn create_rows_batch( &self, input: CreateRowsBatchInput, ) -> Result<Vec<CreateEntityOutput>, RedDBError>; fn create_rows_batch_prevalidated( &self, input: CreateRowsBatchInput, ) -> Result<usize, RedDBError>; fn create_rows_batch_prevalidated_columnar( &self, collection: String, column_names: Arc<Vec<String>>, rows: Vec<Vec<Value>>, ) -> Result<usize, RedDBError>; fn create_rows_batch_columnar( &self, collection: String, column_names: Arc<Vec<String>>, rows: Vec<Vec<Value>>, ) -> Result<usize, RedDBError>; fn create_rows_batch_columnar_with_outputs( &self, collection: String, column_names: Arc<Vec<String>>, rows: Vec<Vec<Value>>, ) -> Result<Vec<CreateEntityOutput>, RedDBError>; fn create_node( &self, input: CreateNodeInput, ) -> Result<CreateEntityOutput, RedDBError>; fn create_edge( &self, input: CreateEdgeInput, ) -> Result<CreateEntityOutput, RedDBError>; fn create_vector( &self, input: CreateVectorInput, ) -> Result<CreateEntityOutput, RedDBError>; fn create_document( &self, input: CreateDocumentInput, ) -> Result<CreateEntityOutput, RedDBError>; fn create_kv( &self, input: CreateKvInput, ) -> Result<CreateEntityOutput, RedDBError>; fn create_timeseries_point( &self, input: CreateTimeSeriesPointInput, ) -> Result<CreateEntityOutput, RedDBError>; fn get_kv( &self, collection: &str, key: &str, ) -> Result<Option<(Value, EntityId)>, RedDBError>; fn delete_kv(&self, collection: &str, key: &str) -> Result<bool, RedDBError>; fn patch_entity( &self, input: PatchEntityInput, ) -> Result<CreateEntityOutput, RedDBError>; fn delete_entity( &self, input: DeleteEntityInput, ) -> Result<DeleteEntityOutput, RedDBError>;
}

Required Methods§

Source

fn create_row( &self, input: CreateRowInput, ) -> Result<CreateEntityOutput, RedDBError>

Source

fn create_rows_batch( &self, input: CreateRowsBatchInput, ) -> Result<Vec<CreateEntityOutput>, RedDBError>

Source

fn create_rows_batch_prevalidated( &self, input: CreateRowsBatchInput, ) -> Result<usize, RedDBError>

Pre-validated bulk insert — caller has already checked column types and uniqueness. Server skips normalize_row_fields_for_contract, enforce_row_uniqueness, and enforce_row_batch_uniqueness. Returns the row count. Used by MSG_BULK_INSERT_PREVALIDATED.

Source

fn create_rows_batch_prevalidated_columnar( &self, collection: String, column_names: Arc<Vec<String>>, rows: Vec<Vec<Value>>, ) -> Result<usize, RedDBError>

Columnar pre-validated bulk insert — the wire handler decoded straight into Vec<Vec<Value>> + a shared column- name vector, no per-cell (String, Value) tuples allocated. Avoids ~N×ncols String clones vs the tuple path. The schema is shared across every row as a single Arc<Vec<String>>.

Source

fn create_rows_batch_columnar( &self, collection: String, column_names: Arc<Vec<String>>, rows: Vec<Vec<Value>>, ) -> Result<usize, RedDBError>

Columnar bulk insert with full contract validation — wire handler shape (one Arc<Vec<String>> schema shared across every row, Vec<Vec<Value>> row payload). Equivalent to create_rows_batch semantically but skips the per-row (String, Value) tuple materialisation in the wire decoder. When the collection has no contract (or no declared columns) fast-paths to create_rows_batch_prevalidated_columnar; otherwise falls back to the tuple path so contract normalisation can run.

Source

fn create_rows_batch_columnar_with_outputs( &self, collection: String, column_names: Arc<Vec<String>>, rows: Vec<Vec<Value>>, ) -> Result<Vec<CreateEntityOutput>, RedDBError>

Columnar bulk insert that also returns assigned entity ids. Kept separate from Self::create_rows_batch_columnar so bulk wire callers can retain their count-only contract.

Source

fn create_node( &self, input: CreateNodeInput, ) -> Result<CreateEntityOutput, RedDBError>

Source

fn create_edge( &self, input: CreateEdgeInput, ) -> Result<CreateEntityOutput, RedDBError>

Source

fn create_vector( &self, input: CreateVectorInput, ) -> Result<CreateEntityOutput, RedDBError>

Source

fn create_document( &self, input: CreateDocumentInput, ) -> Result<CreateEntityOutput, RedDBError>

Source

fn create_kv( &self, input: CreateKvInput, ) -> Result<CreateEntityOutput, RedDBError>

Source

fn create_timeseries_point( &self, input: CreateTimeSeriesPointInput, ) -> Result<CreateEntityOutput, RedDBError>

Source

fn get_kv( &self, collection: &str, key: &str, ) -> Result<Option<(Value, EntityId)>, RedDBError>

Source

fn delete_kv(&self, collection: &str, key: &str) -> Result<bool, RedDBError>

Source

fn patch_entity( &self, input: PatchEntityInput, ) -> Result<CreateEntityOutput, RedDBError>

Source

fn delete_entity( &self, input: DeleteEntityInput, ) -> Result<DeleteEntityOutput, RedDBError>

Implementors§