Package liquibase.ext.mongodb.statement
Class CountDocumentsInCollectionStatement
- java.lang.Object
-
- liquibase.statement.AbstractSqlStatement
-
- liquibase.nosql.statement.AbstractNoSqlStatement
-
- liquibase.ext.mongodb.statement.AbstractMongoStatement
-
- liquibase.ext.mongodb.statement.AbstractCollectionStatement
-
- liquibase.ext.mongodb.statement.CountDocumentsInCollectionStatement
-
- All Implemented Interfaces:
NoSqlQueryForLongStatement<MongoLiquibaseDatabase>,liquibase.statement.SqlStatement
public class CountDocumentsInCollectionStatement extends AbstractCollectionStatement implements NoSqlQueryForLongStatement<MongoLiquibaseDatabase>
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMMAND_NAME-
Fields inherited from class liquibase.ext.mongodb.statement.AbstractCollectionStatement
collectionName
-
-
Constructor Summary
Constructors Constructor Description CountDocumentsInCollectionStatement(String collectionName)CountDocumentsInCollectionStatement(String collectionName, org.bson.conversions.Bson filter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCommandName()longqueryForLong(MongoLiquibaseDatabase database)StringtoJs()Provides a pseudo javascript representation of the collection related statement (for example that can be ran in the mongo shell.-
Methods inherited from class liquibase.nosql.statement.AbstractNoSqlStatement
continueOnError, skipOnUnsupported, toString
-
-
-
-
Field Detail
-
COMMAND_NAME
public static final String COMMAND_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getCommandName
public String getCommandName()
- Specified by:
getCommandNamein classAbstractNoSqlStatement
-
toJs
public String toJs()
Description copied from class:AbstractCollectionStatementProvides a pseudo javascript representation of the collection related statement (for example that can be ran in the mongo shell. Exceptions examples are count which uses db.getCollectionNames however filters programmatically by name).- Overrides:
toJsin classAbstractCollectionStatement- Returns:
- javascript version of the full command
-
queryForLong
public long queryForLong(MongoLiquibaseDatabase database)
- Specified by:
queryForLongin interfaceNoSqlQueryForLongStatement<MongoLiquibaseDatabase>
-
-