pub struct D1DataStore<E: D1Executor> { /* private fields */ }Implementations§
Source§impl<E: D1Executor> D1DataStore<E>
impl<E: D1Executor> D1DataStore<E>
pub fn new(executor: E, manifest: AppManifest) -> Self
Trait Implementations§
Source§impl<E: D1Executor> DataStore for D1DataStore<E>
impl<E: D1Executor> DataStore for D1DataStore<E>
fn manifest(&self) -> &AppManifest
fn insert(&self, entity: &str, data: &Value) -> Result<String, DataError>
fn get_by_id(&self, entity: &str, id: &str) -> Result<Option<Value>, DataError>
fn list(&self, entity: &str) -> Result<Vec<Value>, DataError>
fn list_after( &self, entity: &str, after: Option<&str>, limit: usize, ) -> Result<Vec<Value>, DataError>
fn update( &self, entity: &str, id: &str, data: &Value, ) -> Result<bool, DataError>
fn delete(&self, entity: &str, id: &str) -> Result<bool, DataError>
fn lookup( &self, entity: &str, field: &str, value: &str, ) -> Result<Option<Value>, DataError>
fn link( &self, entity: &str, id: &str, relation: &str, target_id: &str, ) -> Result<bool, DataError>
fn unlink( &self, entity: &str, id: &str, relation: &str, ) -> Result<bool, DataError>
fn query_filtered( &self, entity: &str, filter: &Value, ) -> Result<Vec<Value>, DataError>
fn query_graph(&self, query: &Value) -> Result<Value, DataError>
Source§fn transact(&self, ops: &[Value]) -> Result<(bool, Vec<Value>), DataError>
fn transact(&self, ops: &[Value]) -> Result<(bool, Vec<Value>), DataError>
Execute transactional operations. Each element is a JSON object with
op (“insert”/“update”/“delete”), entity, and optionally id/data. Read moreSource§fn aggregate(&self, _entity: &str, _spec: &Value) -> Result<Value, DataError>
fn aggregate(&self, _entity: &str, _spec: &Value) -> Result<Value, DataError>
Run an aggregation query. Read more
Source§fn search(&self, _entity: &str, _query: &Value) -> Result<Value, DataError>
fn search(&self, _entity: &str, _query: &Value) -> Result<Value, DataError>
Run a faceted full-text search against a searchable entity.
query
is a JSON object with the keys defined by SearchQuery in
pylon_storage::search; returns a JSON object shaped like
SearchResult ({ hits, facetCounts, total, tookMs }). Read moreSource§fn crdt_snapshot(
&self,
_entity: &str,
_row_id: &str,
) -> Result<Option<Vec<u8>>, DataError>
fn crdt_snapshot( &self, _entity: &str, _row_id: &str, ) -> Result<Option<Vec<u8>>, DataError>
Return the binary CRDT snapshot for a row, used by the router
to ship a binary update over WebSocket after every successful
write. Read more
Source§fn crdt_apply_update(
&self,
_entity: &str,
_row_id: &str,
_update: &[u8],
) -> Result<Vec<u8>, DataError>
fn crdt_apply_update( &self, _entity: &str, _row_id: &str, _update: &[u8], ) -> Result<Vec<u8>, DataError>
Apply a binary CRDT update from a client to the row’s LoroDoc,
project the new state into the SQLite materialized view, and
return the post-merge snapshot bytes (so the caller can
broadcast them to OTHER subscribed clients). Read more
Auto Trait Implementations§
impl<E> Freeze for D1DataStore<E>where
E: Freeze,
impl<E> RefUnwindSafe for D1DataStore<E>where
E: RefUnwindSafe,
impl<E> Send for D1DataStore<E>
impl<E> Sync for D1DataStore<E>
impl<E> Unpin for D1DataStore<E>where
E: Unpin,
impl<E> UnsafeUnpin for D1DataStore<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for D1DataStore<E>where
E: UnwindSafe,
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
Mutably borrows from an owned value. Read more