Class

com.github.jeroenr.tepkin

MongoCollection

Related Doc: package tepkin

Permalink

class MongoCollection extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MongoCollection
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MongoCollection(databaseName: String, collectionName: String, pool: ActorRef)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def aggregate(pipeline: List[BsonDocument], explain: Option[Boolean] = None, allowDiskUse: Option[Boolean] = None, cursor: Option[BsonDocument] = None, batchMultiplier: Int = 1000)(implicit timeout: Timeout): Source[List[BsonDocument], ActorRef]

    Permalink

    Calculates aggregate values for the data in this collection.

    Calculates aggregate values for the data in this collection.

    pipeline

    A sequence of data aggregation operations or stages.

    explain

    Specifies to return the information on the processing of the pipeline.

    allowDiskUse

    Enables writing to temporary files. When set to true, aggregation operations can write data to the _tmp subdirectory in the dbPath directory.

    cursor

    Specifies the initial batch size for the cursor. The value of the cursor field is a document with the field batchSize.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def count(query: Option[BsonDocument] = None, limit: Option[Int] = None, skip: Option[Int] = None)(implicit ec: ExecutionContext, timeout: Timeout): Future[CountResult]

    Permalink

    Counts the number of documents in this collection.

    Counts the number of documents in this collection.

    query

    A query that selects which documents to count in a collection.

    limit

    The maximum number of matching documents to return.

    skip

    The number of matching documents to skip before returning results.

  8. def createIndexes(indexes: Index*)(implicit ec: ExecutionContext, timeout: Timeout): Future[CreateIndexesResult]

    Permalink

    Creates indexes on this collection.

  9. def delete(query: BsonDocument, justOne: Boolean = false, writeConcern: Option[WriteConcern] = None)(implicit ec: ExecutionContext, timeout: Timeout): Future[DeleteResult]

    Permalink

    Removes documents from a collection.

    Removes documents from a collection.

    query

    Specifies deletion criteria using query operators. To delete all documents in a collection, pass an empty document ({}).

    justOne

    To limit the deletion to just one document, set to true. Omit to use the default value of false and delete all documents matching the deletion criteria.

    writeConcern

    A document expressing the write concern. Omit to use the default write concern.

    returns

    A WriteResult object that contains the status of the operation.

  10. def distinct(field: String, query: Option[BsonDocument] = None)(implicit ec: ExecutionContext, timeout: Timeout): Future[DistinctResult]

    Permalink

    Finds the distinct values for a specified field across a single collection and returns the results in an array.

    Finds the distinct values for a specified field across a single collection and returns the results in an array.

    field

    The field for which to return distinct values.

    query

    A query that specifies the documents from which to retrieve the distinct values.

  11. def drop()(implicit ec: ExecutionContext, timeout: Timeout): Future[Reply]

    Permalink

    Drops this collection

  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def find(query: BsonDocument, fields: Option[BsonDocument] = None, skip: Int = 0, tailable: Boolean = false, batchMultiplier: Int = 1000)(implicit timeout: Timeout): Source[List[BsonDocument], ActorRef]

    Permalink

    Selects documents in this collection.

    Selects documents in this collection.

    query

    Specifies selection criteria using query operators. To return all documents in a collection, pass an empty document ({}).

    fields

    Specifies the fields to return using projection operators. To return all fields in the matching document, omit this parameter.

  16. def findAndRemove(query: Option[BsonDocument] = None, sort: Option[BsonDocument] = None, fields: Option[Seq[String]] = None)(implicit ec: ExecutionContext, timeout: Timeout): Future[Option[BsonDocument]]

    Permalink

    Removes and returns a single document.

    Removes and returns a single document.

    query

    The selection criteria for the remove.

    sort

    Determines which model the operation removes if the query selects multiple models. findAndRemove() removes the first model in the sort order specified by this argument.

    fields

    A subset of fields to return.

  17. def findAndUpdate(query: Option[BsonDocument] = None, sort: Option[BsonDocument] = None, update: BsonDocument, returnNew: Boolean = false, fields: Option[Seq[String]] = None, upsert: Boolean = false)(implicit ec: ExecutionContext, timeout: Timeout): Future[Option[BsonDocument]]

    Permalink

    Updates and returns a single document.

    Updates and returns a single document. It returns the old document by default.

    query

    The selection criteria for the update.

    sort

    Determines which model the operation updates if the query selects multiple models. findAndUpdate() updates the first model in the sort order specified by this argument.

    update

    Performs an update of the selected model.

    returnNew

    When true, returns the updated model rather than the original.

    fields

    A subset of fields to return.

    upsert

    When true, findAndUpdate() creates a new model if no model matches the query.

  18. def findOne(query: BsonDocument = BsonDocument.empty, skip: Int = 0)(implicit ec: ExecutionContext, timeout: Timeout): Future[Option[BsonDocument]]

    Permalink

    Retrieves at most one document matching the given selector.

  19. def findRandom(query: Option[BsonDocument] = None)(implicit ec: ExecutionContext, timeout: Timeout): Future[Option[BsonDocument]]

    Permalink

    Retrieves a random document matching the given selector.

  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def getIndexes()(implicit ec: ExecutionContext, timeout: Timeout): Future[List[Index]]

    Permalink

    Returns a list of documents that identify and describe the existing indexes on this collection.

  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. def insert(documents: Seq[BsonDocument], ordered: Option[Boolean] = None, writeConcern: Option[WriteConcern] = None)(implicit ec: ExecutionContext, timeout: Timeout): Future[InsertResult]

    Permalink

    Inserts documents into a collection.

    Inserts documents into a collection.

    documents

    A sequence of documents to insert into the collection.

    ordered

    If true, perform an ordered insert of the documents in the array, and if an error occurs with one of documents, MongoDB will return without processing the remaining documents in the array. If false, perform an unordered insert, and if an error occurs with one of documents, continue processing the remaining documents in the array.

    writeConcern

    A document expressing the write concern.

  24. def insert(document: BsonDocument, writeConcern: WriteConcern)(implicit ec: ExecutionContext, timeout: Timeout): Future[InsertResult]

    Permalink

    Inserts document into this collection.

    Inserts document into this collection.

    document

    document to insert into the collection.

  25. def insert(document: BsonDocument)(implicit ec: ExecutionContext, timeout: Timeout): Future[InsertResult]

    Permalink

    Inserts document into this collection.

    Inserts document into this collection.

    document

    document to insert into the collection.

  26. def insertFromSource[M](source: Source[List[BsonDocument], M], ordered: Option[Boolean] = None, writeConcern: Option[WriteConcern] = None)(implicit ec: ExecutionContext, timeout: Timeout): Source[InsertResult, M]

    Permalink

    Inserts documents into a collection.

    Inserts documents into a collection.

    source

    A source of documents to insert into the collection.

    ordered

    If true, perform an ordered insert of the documents in the array, and if an error occurs with one of documents, MongoDB will return without processing the remaining documents in the array. If false, perform an unordered insert, and if an error occurs with one of documents, continue processing the remaining documents in the array.

    writeConcern

    A document expressing the write concern.

  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. def sink(parallelism: Int = 1, ordered: Option[Boolean] = None, writeConcern: Option[WriteConcern] = None): Sink[Bulk, ActorRef]

    Permalink

    Returns a sink which inserts bulk documents.

    Returns a sink which inserts bulk documents.

    parallelism

    max number of parallel insert commands.

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  34. def update(query: BsonDocument, update: BsonDocument, upsert: Option[Boolean] = None, multi: Option[Boolean] = None, writeConcern: Option[WriteConcern] = None)(implicit ec: ExecutionContext, timeout: Timeout): Future[UpdateResult]

    Permalink

    Modifies an existing document or documents in a collection.

    Modifies an existing document or documents in a collection. The method can modify specific fields of an existing document or documents or replace an existing document entirely, depending on the update parameter.

    query

    The selection criteria for the update. Use the same query selectors as used in the find() method.

    update

    The modifications to apply.

    upsert

    If set to true, creates a new document when no document matches the query criteria. The default value is false, which does not insert a new document when no match is found.

    multi

    If set to true, updates multiple documents that meet the query criteria. If set to false, updates one document. The default value is false.

    writeConcern

    A document expressing the write concern.

  35. def validate(full: Option[Boolean] = None, scandata: Option[Boolean] = None)(implicit ec: ExecutionContext, timeout: Timeout): Future[BsonDocument]

    Permalink

    Validates a collection.

    Validates a collection. The method scans a collection’s data structures for correctness and returns a single document that describes the relationship between the logical collection and the physical representation of the data.

    full

    Specify true to enable a full validation and to return full statistics. MongoDB disables full validation by default because it is a potentially resource-intensive operation.

    scandata

    if false skips the scan of the base collection without skipping the scan of the index.

  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped