Struct pliantdb_local::Database[][src]

pub struct Database<DB> { /* fields omitted */ }
Expand description

A local, file-based database.

Implementations

Returns the name of the database.

Creates a Storage with a single-database named “default” with its data stored at path.

Returns the Storage that this database belongs to.

Returns the Schematic for DB.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Applies a Transaction to the schema::Schema. If any operation in the Transaction fails, none of the operations will be applied to the schema::Schema. Read more

Retrieves a stored document from Collection C identified by id.

Retrieves all documents matching ids. Documents that are not found are not returned, but no error will be generated. Read more

Lists executed Transactions from this schema::Schema. By default, a maximum of 1000 entries will be returned, but that limit can be overridden by setting result_limit. A hard limit of 100,000 results will be returned. To begin listing after another known transaction_id, pass transaction_id + 1 into starting_id. Read more

Queries for view entries matching View.

Queries for view entries matching View.

Reduces the view entries matching View.

Reduces the view entries matching View, reducing the values by each unique key. Read more

Fetches the last transaction id that has been committed, if any.

Accesses a collection for the connected schema::Schema.

Inserts a newly created document into the connected schema::Schema for the Collection C.

Updates an existing document in the connected schema::Schema for the Collection C. Upon success, doc.revision will be updated with the new revision. Read more

Removes a Document from the database.

Initializes View for schema::View V.

Formats the value using the given formatter. Read more

Executes a single KeyOperation.

Sets key to value. This function returns a builder that is also a Future. Awaiting the builder will execute Command::Set with the options given. Read more

Sets key to value. This stores the value as a Numeric, enabling atomic math operations to be performed on this key. This function returns a builder that is also a Future. Awaiting the builder will execute Command::Set with the options given. Read more

Increments key by value. The value stored must be a Numeric, otherwise an error will be returned. The result of the increment will be the value’s type. For example, if the stored value is currently a u64, but value is a f64, the current value will be converted to an f64, and the stored value will be an f64. Read more

Decrements key by value. The value stored must be a Numeric, otherwise an error will be returned. The result of the decrement will be the value’s type. For example, if the stored value is currently a u64, but value is a f64, the current value will be converted to an f64, and the stored value will be an f64. Read more

Gets the value stored at key. This function returns a builder that is also a Future. Awaiting the builder will execute Command::Get with the options given. Read more

Deletes the value stored at key.

The current namespace.

Access this Key-Value store within a namespace. When using the returned Namespaced instance, all keys specified will be separated into their own storage designated by namespace. Read more

The Subscriber type for this PubSub connection.

Create a new Subscriber for this relay.

Publishes a payload to all subscribers of topic.

Publishes a payload to all subscribers of all topics.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.