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),
}

A database-related request.

Variants

Get

Retrieve a single document.

Show fields

Fields of Get

collection: CollectionName

The collection of the document.

id: u64

The id of the document.

GetMultiple

Retrieve multiple documents.

Show fields

Fields of GetMultiple

collection: CollectionName

The collection of the documents.

ids: Vec<u64, Global>

The ids of the documents.

Query

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.

Reduce

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.

ApplyTransaction

Applies a transaction.

Show fields

Fields of ApplyTransaction

transaction: Transaction<'static>

The trasnaction to apply.

ListExecutedTransactions

Lists executed transactions.

Show fields

Fields of ListExecutedTransactions

starting_id: Option<u64>

The starting transaction id.

result_limit: Option<usize>

The maximum number of results.

LastTransactionId

Queries the last transaction id.

CreateSubscriber

Creates a PubSub Subscriber

Publish

Publishes payload to all subscribers of topic.

Show fields

Fields of Publish

topic: String

The topics to publish to.

payload: Vec<u8, Global>

The payload to publish.

PublishToAll

Publishes payload to all subscribers of all topics.

Show fields

Fields of PublishToAll

topics: Vec<String, Global>

The topics to publish to.

payload: Vec<u8, Global>

The payload to publish.

SubscribeTo

Subscribes subscriber_id to messages for topic.

Show fields

Fields of SubscribeTo

subscriber_id: u64

The id of the Subscriber.

topic: String

The topic to subscribe to.

UnsubscribeFrom

Unsubscribes subscriber_id from messages for topic.

Show fields

Fields of UnsubscribeFrom

subscriber_id: u64

The id of the Subscriber.

topic: String

The topic to unsubscribe from.

UnregisterSubscriber

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

impl Clone for DatabaseRequest[src]

impl Debug for DatabaseRequest[src]

impl<'de> Deserialize<'de> for DatabaseRequest[src]

impl Serialize for DatabaseRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,