Class Documents

java.lang.Object
org.restheart.mongodb.db.Documents

public class Documents extends Object
Author:
Andrea Di Cesare <andrea@softinstigate.com>
  • Method Details

    • get

      public static Documents get()
    • getDocumentEtag

      public org.bson.BsonDocument getDocumentEtag(Optional<com.mongodb.client.ClientSession> cs, Optional<RSOps> rsOps, String dbName, String collName, Object documentId)
      Parameters:
      cs - the client session
      rsOps - the ReplicaSet connection options
      dbName - the database name
      collName -
      documentId -
      Returns:
    • writeDocument

      public OperationResult writeDocument(Optional<com.mongodb.client.ClientSession> cs, Optional<RSOps> rsOps, String dbName, String collName, ExchangeKeys.METHOD method, ExchangeKeys.WRITE_MODE writeMode, Optional<org.bson.BsonValue> documentId, Optional<org.bson.BsonDocument> filter, Optional<org.bson.BsonDocument> shardKeys, org.bson.BsonValue newContent, String requestEtag, boolean checkEtag)
      Parameters:
      cs - the client session
      rsOps - the ReplicaSet connection options
      dbName - the database name
      method - the request method
      writeMode - the write mode
      collName -
      documentId -
      shardKeys -
      newContent -
      requestEtag -
      checkEtag -
      Returns:
      the OperationResult
    • bulkPostDocuments

      public BulkOperationResult bulkPostDocuments(Optional<com.mongodb.client.ClientSession> cs, Optional<RSOps> rsOps, String dbName, String collName, org.bson.BsonArray documents, Optional<org.bson.BsonDocument> filter, Optional<org.bson.BsonDocument> shardKeys, ExchangeKeys.WRITE_MODE writeMode)
      Parameters:
      cs - the client session
      rsOps - the ReplicaSet connection options
      dbName - the database name
      collName -
      documents -
      shardKeys -
      writeMode -
      Returns:
      the BulkOperationResult
    • bulkPatchDocuments

      public BulkOperationResult bulkPatchDocuments(Optional<com.mongodb.client.ClientSession> cs, Optional<RSOps> rsOps, String dbName, String collName, org.bson.BsonDocument filter, Optional<org.bson.BsonDocument> shardKeys, org.bson.BsonDocument data)
      Parameters:
      cs - the client session
      rsOps - the ReplicaSet connection options
      dbName - the database name
      collName -
      filter -
      shardedKeys -
      data -
      Returns:
      the BulkOperationResult
    • deleteDocument

      public OperationResult deleteDocument(Optional<com.mongodb.client.ClientSession> cs, Optional<RSOps> rsOps, String dbName, String collName, Optional<org.bson.BsonValue> documentId, Optional<org.bson.BsonDocument> filter, Optional<org.bson.BsonDocument> shardKeys, String requestEtag, boolean checkEtag)
      Parameters:
      cs - the client session
      rsOps - the ReplicaSet connection options
      dbName - the database name
      collName -
      documentId -
      filter -
      shardedKeys -
      requestEtag -
      checkEtag -
      Returns:
      the OperationResult
    • bulkDeleteDocuments

      public BulkOperationResult bulkDeleteDocuments(Optional<com.mongodb.client.ClientSession> cs, Optional<RSOps> rsOps, String dbName, String collName, org.bson.BsonDocument filter, Optional<org.bson.BsonDocument> shardedKeys)
      Parameters:
      cs - the client session
      rsOps - the ReplicaSet connection options
      dbName - the database name
      collName -
      filter -
      shardedKeys -
      Returns:
      the BulkOperationResult