pub struct PropertyManager { /* private fields */ }Implementations§
Source§impl PropertyManager
impl PropertyManager
Sourcepub fn new(
storage: Arc<StorageManager>,
schema_manager: Arc<SchemaManager>,
capacity: usize,
) -> Self
pub fn new( storage: Arc<StorageManager>, schema_manager: Arc<SchemaManager>, capacity: usize, ) -> Self
Construct a PropertyManager with an empty plugin registry.
Back-compat shim for the ~17 algorithm and test call sites that
don’t need registry-dispatched CRDT merges. Equivalent to
Self::with_plugin_registry with Arc::new(PluginRegistry::new()).
Sourcepub fn with_plugin_registry(
storage: Arc<StorageManager>,
schema_manager: Arc<SchemaManager>,
capacity: usize,
plugin_registry: Arc<PluginRegistry>,
) -> Self
pub fn with_plugin_registry( storage: Arc<StorageManager>, schema_manager: Arc<SchemaManager>, capacity: usize, plugin_registry: Arc<PluginRegistry>, ) -> Self
Construct a PropertyManager wired to a shared PluginRegistry.
CRDT merges in this PropertyManager consult plugin_registry
for CrdtKindProviders matching each Crdt::kind(); matched
kinds dispatch through the provider (so hot-reloaded plugins
take effect immediately), unmatched kinds fall back to the
native Crdt::try_merge.
pub fn cache_size(&self) -> usize
Sourcepub fn caching_enabled(&self) -> bool
pub fn caching_enabled(&self) -> bool
Check if caching is enabled
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
Clear all caches. Call this when L0 is rotated, flushed, or compaction occurs to prevent stale reads.
Sourcepub async fn invalidate_vertex(&self, _vid: Vid)
pub async fn invalidate_vertex(&self, _vid: Vid)
Invalidate a specific vertex’s cached properties.
Sourcepub async fn invalidate_edge(&self, _eid: Eid)
pub async fn invalidate_edge(&self, _eid: Eid)
Invalidate a specific edge’s cached properties.
pub async fn get_edge_prop( &self, eid: Eid, prop: &str, ctx: Option<&QueryContext>, ) -> Result<Value>
pub async fn get_all_edge_props_with_ctx( &self, eid: Eid, ctx: Option<&QueryContext>, ) -> Result<Option<Properties>>
Sourcepub async fn flushed_edge_key_conflict(
&self,
edge_type: &str,
key_values: &[(String, Value)],
exclude_eid: Option<Eid>,
) -> Result<bool>
pub async fn flushed_edge_key_conflict( &self, edge_type: &str, key_values: &[(String, Value)], exclude_eid: Option<Eid>, ) -> Result<bool>
Reports whether a live flushed edge of edge_type already carries the
given unique-key values, excluding exclude_eid.
The committed-storage half of the edge-uniqueness full-horizon probe (the
in-memory L0 layers are checked separately via has_edge_constraint_key).
The per-type delta table is an LSM log — multiple versions per eid, later
op = 0 writes overwrite properties, op = 1 deletes — so a naive
prop = val AND op = 0 count would wrongly flag an edge that was later
deleted or updated away from val. Instead this narrows to candidate eids
on ONE key property (guaranteed present in some op = 0 row iff the edge
currently holds that value), then resolves each candidate’s current
merged properties via fetch_all_edge_props_from_storage_with_hint
and confirms the full key still matches on a live edge. Correct — never
leaks a duplicate — without an O(edges) full scan.
§Errors
Propagates backend scan errors — fails closed rather than treating a conflict as absent.
Sourcepub async fn get_batch_vertex_props(
&self,
vids: &[Vid],
properties: &[&str],
ctx: Option<&QueryContext>,
) -> Result<HashMap<Vid, Properties>>
pub async fn get_batch_vertex_props( &self, vids: &[Vid], properties: &[&str], ctx: Option<&QueryContext>, ) -> Result<HashMap<Vid, Properties>>
Batch load properties for multiple vertices
Sourcepub async fn get_batch_edge_props(
&self,
eids: &[Eid],
properties: &[&str],
ctx: Option<&QueryContext>,
) -> Result<HashMap<Vid, Properties>>
pub async fn get_batch_edge_props( &self, eids: &[Eid], properties: &[&str], ctx: Option<&QueryContext>, ) -> Result<HashMap<Vid, Properties>>
Load properties as Arrow columns for vectorized processing Batch load properties for multiple edges
Sourcepub async fn get_batch_labels(
&self,
vids: &[Vid],
ctx: Option<&QueryContext>,
) -> Result<HashMap<Vid, Vec<String>>>
pub async fn get_batch_labels( &self, vids: &[Vid], ctx: Option<&QueryContext>, ) -> Result<HashMap<Vid, Vec<String>>>
Batch load labels for multiple vertices.
pub async fn get_all_vertex_props(&self, vid: Vid) -> Result<Properties>
pub async fn get_all_vertex_props_with_ctx( &self, vid: Vid, ctx: Option<&QueryContext>, ) -> Result<Option<Properties>>
Sourcepub async fn get_batch_vertex_props_for_label(
&self,
vids: &[Vid],
label: &str,
ctx: Option<&QueryContext>,
) -> Result<HashMap<Vid, Properties>>
pub async fn get_batch_vertex_props_for_label( &self, vids: &[Vid], label: &str, ctx: Option<&QueryContext>, ) -> Result<HashMap<Vid, Properties>>
Batch-fetch properties for multiple vertices of a known label.
Queries L0 layers in-memory, then fetches remaining VIDs from LanceDB in
a single _vid IN (...) query on the label table. Much faster than
per-vertex get_all_vertex_props_with_ctx when many vertices need loading.
Fetches every columnar property. Callers that only need a subset (e.g. a
vector/search procedure materializing RETURN node.<prop>) should prefer
Self::get_batch_vertex_props_for_label_projected to avoid decoding
unread heavy columns such as List(Vector) (issue #134).
Sourcepub async fn get_batch_vertex_props_for_label_projected(
&self,
vids: &[Vid],
label: &str,
ctx: Option<&QueryContext>,
requested_props: Option<&[String]>,
) -> Result<HashMap<Vid, Properties>>
pub async fn get_batch_vertex_props_for_label_projected( &self, vids: &[Vid], label: &str, ctx: Option<&QueryContext>, requested_props: Option<&[String]>, ) -> Result<HashMap<Vid, Properties>>
Like Self::get_batch_vertex_props_for_label, but restricts the LanceDB
fetch to requested_props (plus the id/version/overflow bookkeeping
columns) when Some. Unread columnar properties — notably heavy
List(Vector) columns — are then never decoded (issue #134). None
fetches all columnar properties, identical to the unprojected method.
Requested names that are not declared columnar properties are ignored
here; they are served from overflow_json, which is always fetched.
Sourcepub async fn get_batch_edge_props_for_type(
&self,
eids: &[Eid],
type_name: &str,
ctx: Option<&QueryContext>,
) -> Result<HashMap<Eid, Properties>>
pub async fn get_batch_edge_props_for_type( &self, eids: &[Eid], type_name: &str, ctx: Option<&QueryContext>, ) -> Result<HashMap<Eid, Properties>>
Batch-fetch properties for multiple edges of a known type.
Mirrors get_batch_vertex_props_for_label (above) for the edge path.
Issues one eid IN (...) scan against the delta table for the edge
type, replaying per-EID version history (op-replay + CRDT merge) the
same way fetch_all_edge_props_from_storage_with_hint does. Far
faster than per-edge get_all_edge_props_with_ctx when many edges
of the same type need loading (e.g., batched SET/REMOVE on edges
matched by a MATCH).
EIDs of deleted edges or those with no rows in delta storage are omitted from the returned map; callers can fall back to the per-EID path for misses.
pub async fn get_vertex_prop(&self, vid: Vid, prop: &str) -> Result<Value>
pub async fn get_vertex_prop_with_ctx( &self, vid: Vid, prop: &str, ctx: Option<&QueryContext>, ) -> Result<Value>
Sourcepub fn value_from_column(
col: &dyn Array,
data_type: &DataType,
row: usize,
) -> Result<Value>
pub fn value_from_column( col: &dyn Array, data_type: &DataType, row: usize, ) -> Result<Value>
Decode an Arrow column value with strict CRDT error handling.
Sourcepub fn merge_crdt_values(&self, a: &Value, b: &Value) -> Result<Value>
pub fn merge_crdt_values(&self, a: &Value, b: &Value) -> Result<Value>
Merge two Value-wrapped CRDT operands.
Routes through uni_crdt::Crdt::merge_via_registry using the
PropertyManager’s plugin_registry. With an empty registry
(the legacy 3-arg Self::new default) merge_via_registry
falls back to Crdt::try_merge, preserving native semantics.
§Errors
Returns an anyhow::Error when either operand is malformed
CRDT JSON, the variants disagree, or the registry-dispatched
merge surfaces a CrdtError.
Auto Trait Implementations§
impl !Freeze for PropertyManager
impl !RefUnwindSafe for PropertyManager
impl !UnwindSafe for PropertyManager
impl Send for PropertyManager
impl Sync for PropertyManager
impl Unpin for PropertyManager
impl UnsafeUnpin for PropertyManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.impl<T> PluginState for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.