Class ProjectsResource.DatabasesResource.DocumentsResource
The "documents" collection of methods.
Inherited Members
Namespace: Google.Apis.Firestore.v1
Assembly: Google.Apis.Firestore.v1.dll
Syntax
public class ProjectsResource.DatabasesResource.DocumentsResource
Constructors
DocumentsResource(IClientService)
Constructs a new resource.
Declaration
public DocumentsResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
BatchGet(BatchGetDocumentsRequest, string)
Gets multiple documents. Documents returned by this method are not guaranteed to be returned in the same order that they were requested.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.BatchGetRequest BatchGet(BatchGetDocumentsRequest body, string database)
Parameters
Type | Name | Description |
---|---|---|
BatchGetDocumentsRequest | body | The body of the request. |
string | database | Required. The database name. In the format: |
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.BatchGetRequest |
BatchWrite(BatchWriteRequest, string)
Applies a batch of write operations. The BatchWrite method does not apply the write operations atomically and can apply them out of order. Method does not allow more than one write per document. Each write succeeds or fails independently. See the BatchWriteResponse for the success status of each write. If you require an atomically applied set of writes, use Commit instead.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.BatchWriteRequest BatchWrite(BatchWriteRequest body, string database)
Parameters
Type | Name | Description |
---|---|---|
BatchWriteRequest | body | The body of the request. |
string | database | Required. The database name. In the format: |
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.BatchWriteRequest |
BeginTransaction(BeginTransactionRequest, string)
Starts a new transaction.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.BeginTransactionRequest BeginTransaction(BeginTransactionRequest body, string database)
Parameters
Type | Name | Description |
---|---|---|
BeginTransactionRequest | body | The body of the request. |
string | database | Required. The database name. In the format: |
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.BeginTransactionRequest |
Commit(CommitRequest, string)
Commits a transaction, while optionally updating documents.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.CommitRequest Commit(CommitRequest body, string database)
Parameters
Type | Name | Description |
---|---|---|
CommitRequest | body | The body of the request. |
string | database | Required. The database name. In the format: |
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.CommitRequest |
CreateDocument(Document, string, string)
Creates a new document.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.CreateDocumentRequest CreateDocument(Document body, string parent, string collectionId)
Parameters
Type | Name | Description |
---|---|---|
Document | body | The body of the request. |
string | parent | Required. The parent resource. For example:
|
string | collectionId | Required. The collection ID, relative to |
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.CreateDocumentRequest |
Delete(string)
Deletes a document.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.DeleteRequest Delete(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The resource name of the Document to delete. In the format:
|
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.DeleteRequest |
Get(string)
Gets a single document.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.GetRequest Get(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The resource name of the Document to get. In the format:
|
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.GetRequest |
List(string, string)
Lists documents.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.ListRequest List(string parent, string collectionId)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The parent resource name. In the format:
|
string | collectionId | Optional. The collection ID, relative to |
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.ListRequest |
ListCollectionIds(ListCollectionIdsRequest, string)
Lists all the collection IDs underneath a document.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.ListCollectionIdsRequest ListCollectionIds(ListCollectionIdsRequest body, string parent)
Parameters
Type | Name | Description |
---|---|---|
ListCollectionIdsRequest | body | The body of the request. |
string | parent | Required. The parent document. In the format:
|
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.ListCollectionIdsRequest |
ListDocuments(string, string)
Lists documents.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.ListDocumentsRequest ListDocuments(string parent, string collectionId)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The parent resource name. In the format:
|
string | collectionId | Optional. The collection ID, relative to |
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.ListDocumentsRequest |
Listen(ListenRequest, string)
Listens to changes. This method is only available via gRPC or WebChannel (not REST).
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.ListenRequest Listen(ListenRequest body, string database)
Parameters
Type | Name | Description |
---|---|---|
ListenRequest | body | The body of the request. |
string | database | Required. The database name. In the format: |
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.ListenRequest |
PartitionQuery(PartitionQueryRequest, string)
Partitions a query by returning partition cursors that can be used to run the query in parallel. The returned partition cursors are split points that can be used by RunQuery as starting/end points for the query results.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.PartitionQueryRequest PartitionQuery(PartitionQueryRequest body, string parent)
Parameters
Type | Name | Description |
---|---|---|
PartitionQueryRequest | body | The body of the request. |
string | parent | Required. The parent resource name. In the format:
|
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.PartitionQueryRequest |
Patch(Document, string)
Updates or inserts a document.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.PatchRequest Patch(Document body, string name)
Parameters
Type | Name | Description |
---|---|---|
Document | body | The body of the request. |
string | name | The resource name of the document, for example
|
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.PatchRequest |
Rollback(RollbackRequest, string)
Rolls back a transaction.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.RollbackRequest Rollback(RollbackRequest body, string database)
Parameters
Type | Name | Description |
---|---|---|
RollbackRequest | body | The body of the request. |
string | database | Required. The database name. In the format: |
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.RollbackRequest |
RunAggregationQuery(RunAggregationQueryRequest, string)
Runs an aggregation query. Rather than producing Document results like Firestore.RunQuery, this API allows running an aggregation to produce a series of AggregationResult server-side. High-Level Example:
-- Return the number of documents in table given a filter. SELECT COUNT(*) FROM (
SELECT * FROM k where a = true );
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.RunAggregationQueryRequest RunAggregationQuery(RunAggregationQueryRequest body, string parent)
Parameters
Type | Name | Description |
---|---|---|
RunAggregationQueryRequest | body | The body of the request. |
string | parent | Required. The parent resource name. In the format:
|
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.RunAggregationQueryRequest |
RunQuery(RunQueryRequest, string)
Runs a query.
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.RunQueryRequest RunQuery(RunQueryRequest body, string parent)
Parameters
Type | Name | Description |
---|---|---|
RunQueryRequest | body | The body of the request. |
string | parent | Required. The parent resource name. In the format:
|
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.RunQueryRequest |
Write(WriteRequest, string)
Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST).
Declaration
public virtual ProjectsResource.DatabasesResource.DocumentsResource.WriteRequest Write(WriteRequest body, string database)
Parameters
Type | Name | Description |
---|---|---|
WriteRequest | body | The body of the request. |
string | database | Required. The database name. In the format: |
Returns
Type | Description |
---|---|
ProjectsResource.DatabasesResource.DocumentsResource.WriteRequest |