Struct rincon_session::CollectionSession [] [src]

pub struct CollectionSession<C> { /* fields omitted */ }

A session for operating with a specific collection.

Methods

impl<C> CollectionSession<C> where
    C: 'static + Connector
[src]

[src]

Returns the name of the database this collection is located in.

[src]

Returns the name of the collection this CollectionSession operates with.

[src]

Returns the Collection entity this CollectionSession operates with.

It returns Some(&Collection) if this session holds a loaded collection entity or None otherwise.

If the collection entity is not loaded the load() function can be used to get a session with a loaded collection entity.

[src]

Unwraps the collection entity out of this session which is either the name of the collection or a Collection instance.

[src]

Returns whether this session holds a loaded collection entity.

It returns true if this session holds the collection entity or false otherwise. If this function returns true the entity() function will return Some(&Collection) otherwise that function returns None.

[src]

Fetches the entity of the collection represented by this session and returns a new CollectionSession with the entity set in the session.

[src]

Drops the collection that is represented by this session.

Returns the identifier of the collection if it has been dropped successfully.

After calling this function the associated CollectionSession is no longer valid.

[src]

Renames the collection represented by this session and returns the renamed collection as a new CollectionSession.

[src]

Gets the revision of the collection represented by this session.

[src]

Gets the properties of the collection represented by this session.

[src]

Changes the properties of the collection represented by this session and returns the updated collection properties.

[src]

Inserts a new document into this collection.

[src]

Inserts a new document into this collection and waits until the changes are written to disk.

[src]

Inserts a new document into this collection and returns the newly created document.

[src]

Inserts a new document into this collection, waits until the changes are written to disk and returns the newly created document

[src]

Inserts multiple documents into this collection.

[src]

Inserts multiple documents into this collection and waits until the changes are written to disk.

[src]

Inserts multiple documents into this collection and returns the newly created documents.

[src]

Inserts multiple documents into this collection, waits until the changes are written to disk and returns the newly created documents.

[src]

Fetches the document with the given key from this collection.

[src]

Fetches the document with the given key from this collection if the revision matches the given predicate.

[src]

Fetches the document with the given key from this collection if the revision does not match the given predicate.

[src]

Fetches multiple documents with the given keys from this collection.

[src]

Replaces an existing document with new content.

Arguments

  • key : The key of the document to be replaced
  • new_document : The new content of the document

[src]

Replaces an existing document with new content if the match condition is met.

Arguments

  • key : The key of the document to be replaced
  • new_document : The new content of the document
  • if_match : The match condition that must be met to replace a document

[src]

Replaces an existing document with new content if the match condition is met. This function allows to specify detailed options for the replace method.

Arguments

  • key : The key of the document to be replaced
  • new_document : The new content of the document
  • if_match : The match condition that must be met to replace a document
  • options : Additional options for the replace method

[src]

Replaces an existing document with new content. This function allows to specify detailed options for the replace method.

Arguments

  • key : The key of the document to be replaced
  • new_document : The new content of the document
  • options : Additional options for the replace method

[src]

Partially modifies an existing document.

The update argument must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not exist yet or overwritten in the existing document if they already exist there.

Arguments

  • key : The key of the document to be modified
  • update : A document with the content to be modified (patch document)

[src]

Partially modifies an existing document if the match condition is met.

The update argument must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not exist yet or overwritten in the existing document if they already exist there.

Arguments

  • key : The key of the document to be modified
  • update : A document with the content to be modified (patch document)
  • if_match : The match condition that must be met to modify a document

[src]

Partially modifies an existing document if the match condition is met. This function allows to specify detailed options for the modify method.

The update argument must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not exist yet or overwritten in the existing document if they already exist there.

Arguments

  • key : The key of the document to be modified
  • update : A document with the content to be modified (patch document)
  • if_match : The match condition that must be met to modify a document
  • options : Additional options for the modify method

[src]

Partially modifies an existing document. This function allows to specify detailed options for the modify method.

The update argument must contain a document with the attributes to patch (the patch document). All attributes from the patch document will be added to the existing document if they do not exist yet or overwritten in the existing document if they already exist there.

Arguments

  • key : The key of the document to be modified
  • update : A document with the content to be modified (patch document)
  • options : Additional options for the modify method

[src]

Deletes the document with the given key from this collection.

[src]

Deletes the document with the given key from this collection if the match condition is met.

Arguments

  • key : The key of the document to be deleted
  • if_match : The match condition that must be met to delete the document

[src]

Deletes the document with the given key from this collection if the match condition is met and waits until the changes are written to disk.

Arguments

  • key : The key of the document to be deleted
  • if_match : The match condition that must be met to delete the document

[src]

Deletes the document with the given key from this collection and waits until the changes are written to disk.

[src]

Deletes the document with the given key from this collection and returns the deleted document.

[src]

Deletes the document with the given key from this collection if the match condition is met and returns the deleted document.

Arguments

  • key : The key of the document to be deleted
  • if_match : The match condition that must be met to delete the document

[src]

Deletes the document with the given key from this collection if the match condition is met, waits until the changes are written to disk and returns the deleted document.

Arguments

  • key : The key of the document to be deleted
  • if_match : The match condition that must be met to delete the document

[src]

Deletes the document with the given key from this collection, waits until the changes are written to disk and returns the deleted document.

[src]

Creates a hash index for this collection if it does not exist already.

Arguments

  • fields : A list of attribute paths
  • unique : Whether a unique index shall be created
  • sparse : A sparse index excludes documents from the index if they that do not contain at least one of the specified index attributes (i.e. fields) or that have a value of null in any of the specified index attributes
  • deduplicate : Whether to use deduplication of array values

[src]

Creates a skip list index for this collection if it does not exist already.

Arguments

  • fields : A list of attribute paths
  • unique : Whether a unique index shall be created
  • sparse : A sparse index excludes documents from the index if they that do not contain at least one of the specified index attributes (i.e. fields) or that have a value of null in any of the specified index attributes
  • deduplicate : Whether to use deduplication of array values

[src]

Creates a persistent index for this collection if it does not exist already.

Arguments

  • fields : A list of attribute paths
  • unique : Whether a unique index shall be created
  • sparse : A sparse index excludes documents from the index if they that do not contain at least one of the specified index attributes (i.e. fields) or that have a value of null in any of the specified index attributes

[src]

Creates a geo spatial index for this collection if it does not exist already.

Arguments

  • location_field : The attribute path of the location field
  • geo_json : If a geo-spatial index on a location is constructed and geo_json is true, then the order within the array is longitude followed by latitude.

[src]

Creates a geo spatial index for this collection if it does not exist already.

Arguments

  • latitude_field : The attribute path of the latitude field
  • longitude_field : The attribute path of the longitude field

[src]

Creates a fulltext index for this collection if it does not exist already.

Arguments

  • field : An attribute paths
  • min_length : Minimum character length of words to index

[src]

Fetches the index with the given key from this collection.

[src]

Deletes the index with the given key from this collection.

Trait Implementations

impl<C: Debug> Debug for CollectionSession<C>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<C> !Send for CollectionSession<C>

impl<C> !Sync for CollectionSession<C>