ProjectsDatabasesDocuments
class ProjectsDatabasesDocuments extends Resource (View source)
The "documents" collection of methods.
Typical usage is:
$firestoreService = new Google\Service\Firestore(...);
$documents = $firestoreService->projects_databases_documents;
Methods
Gets multiple documents. Documents returned by this method are not guaranteed to be returned in the same order that they were requested.
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. (documents.batchWrite)
Starts a new transaction. (documents.beginTransaction)
Commits a transaction, while optionally updating documents.
Creates a new document. (documents.createDocument)
Deletes a document. (documents.delete)
Lists documents. (documents.listProjectsDatabasesDocuments)
Lists all the collection IDs underneath a document.
Lists documents. (documents.listDocuments)
Listens to changes. This method is only available via gRPC or WebChannel (not REST). (documents.listen)
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.
Rolls back a transaction. (documents.rollback)
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 );
(documents.runAggregationQuery)
Runs a query. (documents.runQuery)
Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST). (documents.write)
Details
BatchGetDocumentsResponse
batchGet(string $database, BatchGetDocumentsRequest $postBody, array $optParams = [])
Gets multiple documents. Documents returned by this method are not guaranteed to be returned in the same order that they were requested.
(documents.batchGet)
BatchWriteResponse
batchWrite(string $database, BatchWriteRequest $postBody, array $optParams = [])
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. (documents.batchWrite)
BeginTransactionResponse
beginTransaction(string $database, BeginTransactionRequest $postBody, array $optParams = [])
Starts a new transaction. (documents.beginTransaction)
CommitResponse
commit(string $database, CommitRequest $postBody, array $optParams = [])
Commits a transaction, while optionally updating documents.
(documents.commit)
Document
createDocument(string $parent, string $collectionId, Document $postBody, array $optParams = [])
Creates a new document. (documents.createDocument)
FirestoreEmpty
delete(string $name, array $optParams = [])
Deletes a document. (documents.delete)
Document
get(string $name, array $optParams = [])
Gets a single document. (documents.get)
ListDocumentsResponse
listProjectsDatabasesDocuments(string $parent, string $collectionId, array $optParams = [])
Lists documents. (documents.listProjectsDatabasesDocuments)
ListCollectionIdsResponse
listCollectionIds(string $parent, ListCollectionIdsRequest $postBody, array $optParams = [])
Lists all the collection IDs underneath a document.
(documents.listCollectionIds)
ListDocumentsResponse
listDocuments(string $parent, string $collectionId, array $optParams = [])
Lists documents. (documents.listDocuments)
ListenResponse
listen(string $database, ListenRequest $postBody, array $optParams = [])
Listens to changes. This method is only available via gRPC or WebChannel (not REST). (documents.listen)
PartitionQueryResponse
partitionQuery(string $parent, PartitionQueryRequest $postBody, array $optParams = [])
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.
(documents.partitionQuery)
Document
patch(string $name, Document $postBody, array $optParams = [])
Updates or inserts a document. (documents.patch)
FirestoreEmpty
rollback(string $database, RollbackRequest $postBody, array $optParams = [])
Rolls back a transaction. (documents.rollback)
RunAggregationQueryResponse
runAggregationQuery(string $parent, RunAggregationQueryRequest $postBody, array $optParams = [])
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 );
(documents.runAggregationQuery)
RunQueryResponse
runQuery(string $parent, RunQueryRequest $postBody, array $optParams = [])
Runs a query. (documents.runQuery)
WriteResponse
write(string $database, WriteRequest $postBody, array $optParams = [])
Streams batches of document updates and deletes, in order. This method is only available via gRPC or WebChannel (not REST). (documents.write)