Enum pliantdb_local::core::networking::DatabaseRequest [−][src]
pub enum DatabaseRequest {}Show variants
Get { collection: CollectionName, id: u64, }, GetMultiple { collection: CollectionName, ids: Vec<u64, Global>, }, Query { view: ViewName, key: Option<QueryKey<Vec<u8, Global>>>, access_policy: AccessPolicy, with_docs: bool, }, Reduce { view: ViewName, key: Option<QueryKey<Vec<u8, Global>>>, access_policy: AccessPolicy, grouped: bool, }, ApplyTransaction { transaction: Transaction<'static>, }, ListExecutedTransactions { starting_id: Option<u64>, result_limit: Option<usize>, }, LastTransactionId, CreateSubscriber, Publish { topic: String, payload: Vec<u8, Global>, }, PublishToAll { topics: Vec<String, Global>, payload: Vec<u8, Global>, }, SubscribeTo { subscriber_id: u64, topic: String, }, UnsubscribeFrom { subscriber_id: u64, topic: String, }, UnregisterSubscriber { subscriber_id: u64, }, ExecuteKeyOperation(KeyOperation),
Expand description
A database-related request.
Variants
Retrieve a single document.
Show fields
Fields of Get
Retrieve multiple documents.
Show fields
Fields of GetMultiple
collection: CollectionName
The collection of the documents.
ids: Vec<u64, Global>
The ids of the documents.
Queries a view.
Show fields
Fields of Query
view: ViewName
The name of the view.
key: Option<QueryKey<Vec<u8, Global>>>
The filter for the view.
access_policy: AccessPolicy
The access policy for the query.
with_docs: bool
If true, DatabaseResponse::ViewMappingsWithDocs
will be
returned. If false, DatabaseResponse::ViewMappings
will be
returned.
Reduces a view.
Show fields
Fields of Reduce
view: ViewName
The name of the view.
key: Option<QueryKey<Vec<u8, Global>>>
The filter for the view.
access_policy: AccessPolicy
The access policy for the query.
grouped: bool
Whether to return a single value or values grouped by unique key. If
true, DatabaseResponse::ViewGroupedReduction
will be returned.
If false, DatabaseResponse::ViewReduction
is returned.
Applies a transaction.
Show fields
Fields of ApplyTransaction
transaction: Transaction<'static>
The trasnaction to apply.
Lists executed transactions.
Show fields
Queries the last transaction id.
Creates a PubSub
Subscriber
Publishes payload
to all subscribers of topic
.
Show fields
Publishes payload
to all subscribers of all topics
.
Show fields
Subscribes subscriber_id
to messages for topic
.
Show fields
Fields of SubscribeTo
Unsubscribes subscriber_id
from messages for topic
.
Show fields
Fields of UnsubscribeFrom
Unregisters the subscriber.
Show fields
Fields of UnregisterSubscriber
subscriber_id: u64
The id of the Subscriber
.
ExecuteKeyOperation(KeyOperation)
Excutes a key-value store operation.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<DatabaseRequest, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<DatabaseRequest, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for DatabaseRequest
impl Send for DatabaseRequest
impl Sync for DatabaseRequest
impl Unpin for DatabaseRequest
impl UnwindSafe for DatabaseRequest
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self