Skip to main content

document.proto

path sdk/document.proto

package m10.sdk


Messages​

CollectionMetadata​

Metadata for a document collection.

NameTypeDescription
namestringName of the collection.
descriptor_namestringName of the protobuf message descriptor for documents in this collection.
file_descriptor_setgoogle.protobuf.FileDescriptorSetFile descriptor set containing the message descriptor.
index_metadatarepeated IndexMetadataMetadata for indexes on this collection.
primary_key_pathstringPath to the field that serves as the collection's primary key.

DocumentOperations​

Operations to be performed on a document.

NameTypeDescription
operationsrepeated OperationList of operations.

Exp​

An expression that can be evaluated.

NameTypeDescription
expstringThe expression string.
varsrepeated Exp.VarsEntryVariables used in the expression.

Exp.VarsEntry​

NameTypeDescription
keystring
valueValue

IndexMetadata​

Metadata for an index.

NameTypeDescription
pathrepeated stringPaths of the indexed fields. Compound indexes are represented using a repeated path.

Operation​

A single operation on a document database.

NameTypeDescription
insert_documentOperation.InsertDocumentInserts a new document into a collection.
update_documentOperation.UpdateDocumentUpdates an existing document in a collection.
delete_documentOperation.DeleteDocumentDeletes a document from a collection.
insert_collectionCollectionMetadataInserts metadata for a collection.
insert_indexOperation.InsertIndexInserts an index for a collection.

Operation.DeleteDocument​

Operation to delete a document.

NameTypeDescription
collectionstringThe collection containing the document to delete.
primary_keyValueThe primary key of the document to delete.

Operation.InsertDocument​

Operation to insert a new document.

NameTypeDescription
collectionstringThe collection to insert the document into.
documentbytesThe document to be inserted, serialized as bytes.

Operation.InsertIndex​

Operation to insert an index for a collection.

NameTypeDescription
collectionstringThe collection to create the index on.
pathstringPath of the field being indexed

Operation.UpdateDocument​

Operation to update an existing document.

NameTypeDescription
collectionstringThe collection containing the document to update.
primary_keyValueThe primary key of the document to update.
documentbytesThe updated document, serialized as bytes.
field_maskgoogle.protobuf.FieldMaskA field mask specifying which fields to update.
merge_repeatedboolWhether to merge repeated fields instead of replacing them entirely.

QueryRequest​

A query request against a collection.

NameTypeDescription
collectionstringThe collection to query.
expressionExpThe query expression.
public_keyoptional bytesAn optional public key, for use in encrypted queries

Value​

A value that can be stored in a document.

NameTypeDescription
string_valuestring
int8_valueint32
int16_valueint32
int32_valueint32
int64_valueint64
uint8_valueuint32
uint16_valueuint32
uint32_valueuint32
uint64_valueuint64
double_valuedouble
float_valuefloat
bool_valuebool
bytes_valuebytes