-
Notifications
You must be signed in to change notification settings - Fork 52
Functions
- aggregate_cursor_first_page()
- count_query()
- cursor_get_more()
- delete()
- distinct_query()
- find_and_modify()
- find_cursor_first_page()
- insert()
- insert_one()
- list_collections_cursor_first_page()
- list_indexes_cursor_first_page()
- update()
- coll_mod()
- create_collection()
- create_collection_view()
- drop_collection()
- drop_database()
- rename_collection()
- shard_collection()
This function retrieves the first page of an aggregate cursor.
documentdb_api.aggregate_cursor_first_page(database text, commandSpec documentdb_core.bson, cursorId int8 DEFAULT 0)
-
database
(text): The name of the database. -
commandSpec
(documentdb_core.bson): The BSON specification for the command. -
cursorId
(int8): The cursor ID, default is 0.
-
cursorPage
(documentdb_core.bson): The BSON document representing the cursor page. -
continuation
(documentdb_core.bson): The BSON document representing the continuation. -
persistConnection
(bool): Indicates whether to persist the connection. -
cursorId
(int8): The cursor ID.
This function performs a count query on the specified database.
documentdb_api.count_query(database text, countSpec documentdb_core.bson)
-
database
(text): The name of the database. -
countSpec
(documentdb_core.bson): The BSON specification for the count query.
-
document
(documentdb_core.bson): The BSON document representing the count result.
This function retrieves more results from a cursor.
documentdb_api.cursor_get_more(database text, getMoreSpec documentdb_core.bson, continuationSpec documentdb_core.bson)
-
database
(text): The name of the database. -
getMoreSpec
(documentdb_core.bson): The BSON specification for getting more results. -
continuationSpec
(documentdb_core.bson): The BSON specification for the continuation.
-
cursorPage
(documentdb_core.bson): The BSON document representing the cursor page. -
continuation
(documentdb_core.bson): The BSON document representing the continuation.
This function deletes documents from the specified database.
documentdb_api.delete(p_database_name text, p_delete documentdb_core.bson, p_insert_documents documentdb_core.bsonsequence DEFAULT NULL, p_transaction_id text DEFAULT NULL)
-
p_database_name
(text): The name of the database. -
p_delete
(documentdb_core.bson): The BSON specification for the delete operation. -
p_insert_documents
(documentdb_core.bsonsequence): The BSON sequence of documents to insert, default is NULL. -
p_transaction_id
(text): The transaction ID, default is NULL.
-
p_result
(documentdb_core.bson): The BSON document representing the result. -
p_success
(boolean): Indicates whether the operation was successful.
This function performs a distinct query on the specified database.
documentdb_api.distinct_query(database text, distinctSpec documentdb_core.bson)
-
database
(text): The name of the database. -
distinctSpec
(documentdb_core.bson): The BSON specification for the distinct query.
-
document
(documentdb_core.bson): The BSON document representing the distinct result.
This function finds and modifies documents in the specified database.
documentdb_api.find_and_modify(p_database_name text, p_message documentdb_core.bson, p_transaction_id text DEFAULT NULL)
-
p_database_name
(text): The name of the database. -
p_message
(documentdb_core.bson): The BSON specification for the find and modify operation. -
p_transaction_id
(text): The transaction ID, default is NULL.
-
p_result
(documentdb_core.bson): The BSON document representing the result. -
p_success
(boolean): Indicates whether the operation was successful.
This function retrieves the first page of a find cursor.
documentdb_api.find_cursor_first_page(database text, commandSpec documentdb_core.bson, cursorId int8 DEFAULT 0)
-
database
(text): The name of the database. -
commandSpec
(documentdb_core.bson): The BSON specification for the command. -
cursorId
(int8): The cursor ID, default is 0.
-
cursorPage
(documentdb_core.bson): The BSON document representing the cursor page. -
continuation
(documentdb_core.bson): The BSON document representing the continuation. -
persistConnection
(bool): Indicates whether to persist the connection. -
cursorId
(int8): The cursor ID.
This function inserts documents into the specified database.
documentdb_api.insert(p_database_name text, p_insert documentdb_core.bson, p_insert_documents documentdb_core.bsonsequence DEFAULT NULL, p_transaction_id text DEFAULT NULL)
-
p_database_name
(text): The name of the database. -
p_insert
(documentdb_core.bson): The BSON specification for the insert operation. -
p_insert_documents
(documentdb_core.bsonsequence): The BSON sequence of documents to insert, default is NULL. -
p_transaction_id
(text): The transaction ID, default is NULL.
-
p_result
(documentdb_core.bson): The BSON document representing the result. -
p_success
(boolean): Indicates whether the operation was successful.
This function inserts a single document into the specified database.
documentdb_api.insert_one(p_database_name text, p_collection_name text, p_document documentdb_core.bson, p_transaction_id text DEFAULT NULL)
-
p_database_name
(text): The name of the database. -
p_collection_name
(text): The name of the collection. -
p_document
(documentdb_core.bson): The BSON document to insert. -
p_transaction_id
(text): The transaction ID, default is NULL.
- A BSON document representing the insert result.
This function retrieves the first page of a list collections cursor.
documentdb_api.list_collections_cursor_first_page(database text, commandSpec documentdb_core.bson, cursorId int8 DEFAULT 0)
-
database
(text): The name of the database. -
commandSpec
(documentdb_core.bson): The BSON specification for the command. -
cursorId
(int8): The cursor ID, default is 0.
-
cursorPage
(documentdb_core.bson): The BSON document representing the cursor page. -
continuation
(documentdb_core.bson): The BSON document representing the continuation. -
persistConnection
(bool): Indicates whether to persist the connection. -
cursorId
(int8): The cursor ID.
This function retrieves the first page of a list indexes cursor.
documentdb_api.list_indexes_cursor_first_page(database text, commandSpec documentdb_core.bson, cursorId int8 DEFAULT 0)
-
database
(text): The name of the database. -
commandSpec
(documentdb_core.bson): The BSON specification for the command. -
cursorId
(int8): The cursor ID, default is 0.
-
cursorPage
(documentdb_core.bson): The BSON document representing the cursor page. -
continuation
(documentdb_core.bson): The BSON document representing the continuation. -
persistConnection
(bool): Indicates whether to persist the connection. -
cursorId
(int8): The cursor ID.
This function updates documents in the specified database.
documentdb_api.update(p_database_name text, p_update documentdb_core.bson, p_insert_documents documentdb_core.bsonsequence DEFAULT NULL, p_transaction_id text DEFAULT NULL)
-
p_database_name
(text): The name of the database. -
p_update
(documentdb_core.bson): The BSON specification for the update operation. -
p_insert_documents
(documentdb_core.bsonsequence): The BSON sequence of documents to insert, default is NULL. -
p_transaction_id
(text): The transaction ID, default is NULL.
-
p_result
(documentdb_core.bson): The BSON document representing the result. -
p_success
(boolean): Indicates whether the operation was successful.
This function modifies a collection.
documentdb_api.coll_mod(p_database_name text, p_collection_name text, p_spec documentdb_core.bson)
-
p_database_name
(text): The name of the database. -
p_collection_name
(text): The name of the collection. -
p_spec
(documentdb_core.bson): The BSON specification for the modification.
- A BSON document representing the modification result.
This function creates a new collection.
documentdb_api.create_collection(p_database_name text, p_collection_name text)
-
p_database_name
(text): The name of the database. -
p_collection_name
(text): The name of the collection.
- A BSON document representing the creation result.
This function creates a new collection view.
documentdb_api.create_collection_view(dbname text, createSpec documentdb_core.bson)
-
dbname
(text): The name of the database. -
createSpec
(documentdb_core.bson): The BSON specification for the view creation.
- A BSON document representing the view creation result.
This function drops a collection.
documentdb_api.drop_collection(p_database_name text, p_collection_name text, p_write_concern documentdb_core.bson DEFAULT null, p_collection_uuid uuid DEFAULT null, p_track_changes bool DEFAULT true)
-
p_database_name
(text): The name of the database. -
p_collection_name
(text): The name of the collection. -
p_write_concern
(documentdb_core.bson): The BSON specification for the write concern, default is null. -
p_collection_uuid
(uuid): The UUID of the collection, default is null. -
p_track_changes
(bool): Indicates whether to track changes, default is true.
- A BSON document representing the drop result.
This function drops a database.
documentdb_api.drop_database(p_database_name text, p_write_concern documentdb_core.bson DEFAULT null)
-
p_database_name
(text): The name of the database. -
p_write_concern
(documentdb_core.bson): The BSON specification for the write concern, default is null.
- A BSON document representing the drop result.
This function renames a collection.
documentdb_api.rename_collection(p_database_name text, p_collection_name text, p_target_name text, p_drop_target bool DEFAULT false)
-
p_database_name
(text): The name of the database. -
p_collection_name
(text): The name of the collection. -
p_target_name
(text): The new name for the collection. -
p_drop_target
(bool): Indicates whether to drop the target collection if it exists, default is false.
- A BSON document representing the rename result.
This function shards a collection.
documentdb_api.shard_collection(p_database_name text, p_collection_name text, p_shard_key documentdb_core.bson, p_is_reshard bool DEFAULT true)
-
p_database_name
(text): The name of the database. -
p_collection_name
(text): The name of the collection. -
p_shard_key
(documentdb_core.bson): The BSON specification for the shard key. -
p_is_reshard
(bool): Indicates whether to reshard the collection, default is true.
- A BSON document representing the shard result.
This function creates a new user.
documentdb_api.create_user(p_spec documentdb_core.bson)
-
p_spec
(documentdb_core.bson): The BSON specification for the user creation.
- A BSON document representing the created user.
This function drops a user.
documentdb_api.drop_user(p_spec documentdb_core.bson)
-
p_spec
(documentdb_core.bson): The BSON specification for the user drop.
- A BSON document representing the dropped user.
This function updates a user.
documentdb_api.update_user(p_spec documentdb_core.bson)
-
p_spec
(documentdb_core.bson): The BSON specification for the user update.
- A BSON document representing the updated user.
This function retrieves information about users.
documentdb_api.users_info(p_spec documentdb_core.bson)
-
p_spec
(documentdb_core.bson): The BSON specification for the user information retrieval.
- A BSON document representing the users' information.
This function retrieves the extended version of the binary.
documentdb_api.binary_extended_version()
- A text representing the extended version of the binary.
This function retrieves the version of the binary.
documentdb_api.binary_version()
- A text representing the version of the binary.