documentdb_api

package
v1.24.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateCursorFirstPage

func AggregateCursorFirstPage(ctx context.Context, conn *pgx.Conn, l *slog.Logger, database string, commandSpec wirebson.RawDocument, cursorID int64) (outCursorPage wirebson.RawDocument, outContinuation wirebson.RawDocument, outPersistConnection bool, outCursorID int64, err error)

AggregateCursorFirstPage is a wrapper for

documentdb_api.aggregate_cursor_first_page(database text, commandspec documentdb_core.bson, cursorid bigint DEFAULT 0, OUT cursorpage documentdb_core.bson, OUT continuation documentdb_core.bson, OUT persistconnection boolean, OUT cursorid bigint).

func BinaryExtendedVersion

func BinaryExtendedVersion(ctx context.Context, conn *pgx.Conn, l *slog.Logger) (outBinaryExtendedVersion string, err error)

BinaryExtendedVersion is a wrapper for

documentdb_api.binary_extended_version(OUT binary_extended_version text).

func BinaryVersion

func BinaryVersion(ctx context.Context, conn *pgx.Conn, l *slog.Logger) (outBinaryVersion string, err error)

BinaryVersion is a wrapper for

documentdb_api.binary_version(OUT binary_version text).

func CollMod

func CollMod(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, collectionName string, spec wirebson.RawDocument) (outCollMod wirebson.RawDocument, err error)

CollMod is a wrapper for

documentdb_api.coll_mod(p_database_name text, p_collection_name text, p_spec documentdb_core.bson, OUT coll_mod documentdb_core.bson).

func CollStats

func CollStats(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, collectionName string, scale float64) (outCollStats wirebson.RawDocument, err error)

CollStats is a wrapper for

documentdb_api.coll_stats(p_database_name text, p_collection_name text, p_scale double precision DEFAULT 1, OUT coll_stats documentdb_core.bson).

func Collection

func Collection(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, collectionName string) (outShardKeyValue int64, outObjectID wirebson.RawDocument, outDocument wirebson.RawDocument, err error)

Collection is a wrapper for

documentdb_api.collection(p_database_name text, p_collection_name text, OUT shard_key_value bigint, OUT object_id documentdb_core.bson, OUT document documentdb_core.bson).

func Compact

func Compact(ctx context.Context, conn *pgx.Conn, l *slog.Logger, spec wirebson.RawDocument) (outCompact wirebson.RawDocument, err error)

Compact is a wrapper for

documentdb_api.compact(p_spec documentdb_core.bson, OUT compact documentdb_core.bson).

func ConnectionStatus

func ConnectionStatus(ctx context.Context, conn *pgx.Conn, l *slog.Logger, spec wirebson.RawDocument) (outConnectionStatus wirebson.RawDocument, err error)

ConnectionStatus is a wrapper for

documentdb_api.connection_status(p_spec documentdb_core.bson, OUT connection_status documentdb_core.bson).

func CountQuery

func CountQuery(ctx context.Context, conn *pgx.Conn, l *slog.Logger, database string, countSpec wirebson.RawDocument) (outDocument wirebson.RawDocument, err error)

CountQuery is a wrapper for

documentdb_api.count_query(database text, countspec documentdb_core.bson, OUT document documentdb_core.bson).

func CreateCollection

func CreateCollection(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, collectionName string) (outCreateCollection bool, err error)

CreateCollection is a wrapper for

documentdb_api.create_collection(p_database_name text, p_collection_name text, OUT create_collection boolean).

func CreateCollectionView

func CreateCollectionView(ctx context.Context, conn *pgx.Conn, l *slog.Logger, database string, createSpec wirebson.RawDocument) (outCreateCollectionView wirebson.RawDocument, err error)

CreateCollectionView is a wrapper for

documentdb_api.create_collection_view(dbname text, createspec documentdb_core.bson, OUT create_collection_view documentdb_core.bson).

func CreateIndexesBackground

func CreateIndexesBackground(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, indexSpec wirebson.RawDocument) (outRetVal wirebson.RawDocument, outOk bool, outRequests wirebson.RawDocument, err error)

CreateIndexesBackground is a wrapper for

documentdb_api.create_indexes_background(p_database_name text, p_index_spec documentdb_core.bson, OUT retval documentdb_core.bson, OUT ok boolean, OUT requests documentdb_core.bson).

func CreateRole

func CreateRole(ctx context.Context, conn *pgx.Conn, l *slog.Logger, spec wirebson.RawDocument) (outCreateRole wirebson.RawDocument, err error)

CreateRole is a wrapper for

documentdb_api.create_role(p_spec documentdb_core.bson, OUT create_role documentdb_core.bson).

func CreateUser

func CreateUser(ctx context.Context, conn *pgx.Conn, l *slog.Logger, spec wirebson.RawDocument) (outCreateUser wirebson.RawDocument, err error)

CreateUser is a wrapper for

documentdb_api.create_user(p_spec documentdb_core.bson, OUT create_user documentdb_core.bson).

func CurrentOpCommand

func CurrentOpCommand(ctx context.Context, conn *pgx.Conn, l *slog.Logger, spec wirebson.RawDocument) (outDocument wirebson.RawDocument, err error)

CurrentOpCommand is a wrapper for

documentdb_api.current_op_command(p_spec documentdb_core.bson, OUT document documentdb_core.bson).

func CursorGetMore

func CursorGetMore(ctx context.Context, conn *pgx.Conn, l *slog.Logger, database string, getMoreSpec wirebson.RawDocument, continuationSpec wirebson.RawDocument) (outCursorPage wirebson.RawDocument, outContinuation wirebson.RawDocument, err error)

CursorGetMore is a wrapper for

documentdb_api.cursor_get_more(database text, getmorespec documentdb_core.bson, continuationspec documentdb_core.bson, OUT cursorpage documentdb_core.bson, OUT continuation documentdb_core.bson).

func DbStats

func DbStats(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, scale float64, freestorage bool) (outDbStats wirebson.RawDocument, err error)

DbStats is a wrapper for

documentdb_api.db_stats(p_database_name text, p_scale double precision DEFAULT 1, p_freestorage boolean DEFAULT false, OUT db_stats documentdb_core.bson).

func Delete

func Delete(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, delete wirebson.RawDocument, insertDocuments []byte) (outResult wirebson.RawDocument, outSuccess bool, err error)

Delete is a wrapper for

documentdb_api.delete(p_database_name text, p_delete documentdb_core.bson, p_insert_documents documentdb_core.bsonsequence DEFAULT NULL, OUT p_result documentdb_core.bson, OUT p_success boolean).

func DistinctQuery

func DistinctQuery(ctx context.Context, conn *pgx.Conn, l *slog.Logger, database string, distinctSpec wirebson.RawDocument) (outDocument wirebson.RawDocument, err error)

DistinctQuery is a wrapper for

documentdb_api.distinct_query(database text, distinctspec documentdb_core.bson, OUT document documentdb_core.bson).

func DropCollection

func DropCollection(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, collectionName string, writeConcern wirebson.RawDocument, collectionUuid []byte, trackChanges bool) (outDropCollection bool, err error)

DropCollection is a wrapper for

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 boolean DEFAULT true, OUT drop_collection boolean).

func DropDatabase

func DropDatabase(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, writeConcern wirebson.RawDocument) (err error)

DropDatabase is a wrapper for

documentdb_api.drop_database(p_database_name text, p_write_concern documentdb_core.bson DEFAULT NULL).

func DropIndexes

func DropIndexes(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, arg wirebson.RawDocument, retVal wirebson.RawDocument) (outRetVal wirebson.RawDocument, err error)

DropIndexes is a wrapper for

documentdb_api.drop_indexes(p_database_name text, p_arg documentdb_core.bson, INOUT retval documentdb_core.bson DEFAULT NULL).

TODO https://github.com/documentdb/documentdb/issues/49

func DropRole

func DropRole(ctx context.Context, conn *pgx.Conn, l *slog.Logger, spec wirebson.RawDocument) (outDropRole wirebson.RawDocument, err error)

DropRole is a wrapper for

documentdb_api.drop_role(p_spec documentdb_core.bson, OUT drop_role documentdb_core.bson).

func DropUser

func DropUser(ctx context.Context, conn *pgx.Conn, l *slog.Logger, spec wirebson.RawDocument) (outDropUser wirebson.RawDocument, err error)

DropUser is a wrapper for

documentdb_api.drop_user(p_spec documentdb_core.bson, OUT drop_user documentdb_core.bson).

func FindAndModify

func FindAndModify(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, message wirebson.RawDocument) (outResult wirebson.RawDocument, outSuccess bool, err error)

FindAndModify is a wrapper for

documentdb_api.find_and_modify(p_database_name text, p_message documentdb_core.bson, OUT p_result documentdb_core.bson, OUT p_success boolean).

func FindCursorFirstPage

func FindCursorFirstPage(ctx context.Context, conn *pgx.Conn, l *slog.Logger, database string, commandSpec wirebson.RawDocument, cursorID int64) (outCursorPage wirebson.RawDocument, outContinuation wirebson.RawDocument, outPersistConnection bool, outCursorID int64, err error)

FindCursorFirstPage is a wrapper for

documentdb_api.find_cursor_first_page(database text, commandspec documentdb_core.bson, cursorid bigint DEFAULT 0, OUT cursorpage documentdb_core.bson, OUT continuation documentdb_core.bson, OUT persistconnection boolean, OUT cursorid bigint).

func Insert

func Insert(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, insert wirebson.RawDocument, insertDocuments []byte) (outResult wirebson.RawDocument, outSuccess bool, err error)

Insert is a wrapper for

documentdb_api.insert(p_database_name text, p_insert documentdb_core.bson, p_insert_documents documentdb_core.bsonsequence DEFAULT NULL, OUT p_result documentdb_core.bson, OUT p_success boolean).

func InsertOne

func InsertOne(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, collectionName string, document wirebson.RawDocument) (outInsertOne wirebson.RawDocument, err error)

InsertOne is a wrapper for

documentdb_api.insert_one(p_database_name text, p_collection_name text, p_document documentdb_core.bson, OUT insert_one documentdb_core.bson).

func ListCollectionsCursorFirstPage

func ListCollectionsCursorFirstPage(ctx context.Context, conn *pgx.Conn, l *slog.Logger, database string, commandSpec wirebson.RawDocument, cursorID int64) (outCursorPage wirebson.RawDocument, outContinuation wirebson.RawDocument, outPersistConnection bool, outCursorID int64, err error)

ListCollectionsCursorFirstPage is a wrapper for

documentdb_api.list_collections_cursor_first_page(database text, commandspec documentdb_core.bson, cursorid bigint DEFAULT 0, OUT cursorpage documentdb_core.bson, OUT continuation documentdb_core.bson, OUT persistconnection boolean, OUT cursorid bigint).

func ListDatabases

func ListDatabases(ctx context.Context, conn *pgx.Conn, l *slog.Logger, listDatabasesSpec wirebson.RawDocument) (outListDatabases wirebson.RawDocument, err error)

ListDatabases is a wrapper for

documentdb_api.list_databases(p_list_databases_spec documentdb_core.bson, OUT list_databases documentdb_core.bson).

func ListIndexesCursorFirstPage

func ListIndexesCursorFirstPage(ctx context.Context, conn *pgx.Conn, l *slog.Logger, database string, commandSpec wirebson.RawDocument, cursorID int64) (outCursorPage wirebson.RawDocument, outContinuation wirebson.RawDocument, outPersistConnection bool, outCursorID int64, err error)

ListIndexesCursorFirstPage is a wrapper for

documentdb_api.list_indexes_cursor_first_page(database text, commandspec documentdb_core.bson, cursorid bigint DEFAULT 0, OUT cursorpage documentdb_core.bson, OUT continuation documentdb_core.bson, OUT persistconnection boolean, OUT cursorid bigint).

func RenameCollection

func RenameCollection(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, collectionName string, targetName string, dropTarget bool) (err error)

RenameCollection is a wrapper for

documentdb_api.rename_collection(p_database_name text, p_collection_name text, p_target_name text, p_drop_target boolean DEFAULT false).

func ReshardCollection

func ReshardCollection(ctx context.Context, conn *pgx.Conn, l *slog.Logger, shardKeySpec wirebson.RawDocument) (err error)

ReshardCollection is a wrapper for

documentdb_api.reshard_collection(p_shard_key_spec documentdb_core.bson).

func RolesInfo

func RolesInfo(ctx context.Context, conn *pgx.Conn, l *slog.Logger, spec wirebson.RawDocument) (outRolesInfo wirebson.RawDocument, err error)

RolesInfo is a wrapper for

documentdb_api.roles_info(p_spec documentdb_core.bson, OUT roles_info documentdb_core.bson).

func ShardCollection

func ShardCollection(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, collectionName string, shardKey wirebson.RawDocument, isReshard bool) (err error)

ShardCollection is a wrapper for

documentdb_api.shard_collection(p_database_name text, p_collection_name text, p_shard_key documentdb_core.bson, p_is_reshard boolean DEFAULT true).

func ShardCollection1

func ShardCollection1(ctx context.Context, conn *pgx.Conn, l *slog.Logger, shardKeySpec wirebson.RawDocument) (err error)

ShardCollection1 is a wrapper for

documentdb_api.shard_collection(p_shard_key_spec documentdb_core.bson).

func UnshardCollection

func UnshardCollection(ctx context.Context, conn *pgx.Conn, l *slog.Logger, shardKeySpec wirebson.RawDocument) (err error)

UnshardCollection is a wrapper for

documentdb_api.unshard_collection(p_shard_key_spec documentdb_core.bson).

func Update

func Update(ctx context.Context, conn *pgx.Conn, l *slog.Logger, databaseName string, update wirebson.RawDocument, insertDocuments []byte) (outResult wirebson.RawDocument, outSuccess bool, err error)

Update is a wrapper for

documentdb_api.update(p_database_name text, p_update documentdb_core.bson, p_insert_documents documentdb_core.bsonsequence DEFAULT NULL, OUT p_result documentdb_core.bson, OUT p_success boolean).

func UpdateRole

func UpdateRole(ctx context.Context, conn *pgx.Conn, l *slog.Logger, spec wirebson.RawDocument) (outUpdateRole wirebson.RawDocument, err error)

UpdateRole is a wrapper for

documentdb_api.update_role(p_spec documentdb_core.bson, OUT update_role documentdb_core.bson).

func UpdateUser

func UpdateUser(ctx context.Context, conn *pgx.Conn, l *slog.Logger, spec wirebson.RawDocument) (outUpdateUser wirebson.RawDocument, err error)

UpdateUser is a wrapper for

documentdb_api.update_user(p_spec documentdb_core.bson, OUT update_user documentdb_core.bson).

func UsersInfo

func UsersInfo(ctx context.Context, conn *pgx.Conn, l *slog.Logger, spec wirebson.RawDocument) (outUsersInfo wirebson.RawDocument, err error)

UsersInfo is a wrapper for

documentdb_api.users_info(p_spec documentdb_core.bson, OUT users_info documentdb_core.bson).

func Validate

func Validate(ctx context.Context, conn *pgx.Conn, l *slog.Logger, database string, validateSpec wirebson.RawDocument) (outDocument wirebson.RawDocument, err error)

Validate is a wrapper for

documentdb_api.validate(database text, validatespec documentdb_core.bson, OUT document documentdb_core.bson).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL