Package liquibase.ext.mongodb.statement
Class ListCollectionNamesStatement
java.lang.Object
liquibase.statement.AbstractSqlStatement
liquibase.nosql.statement.AbstractNoSqlStatement
liquibase.ext.mongodb.statement.AbstractMongoStatement
liquibase.ext.mongodb.statement.AbstractRunCommandStatement
liquibase.ext.mongodb.statement.ListCollectionNamesStatement
- All Implemented Interfaces:
NoSqlExecuteStatement<MongoLiquibaseDatabase>,NoSqlQueryForListStatement<MongoLiquibaseDatabase,,String> liquibase.statement.SqlStatement
- Direct Known Subclasses:
CountCollectionByNameStatement
public class ListCollectionNamesStatement
extends AbstractRunCommandStatement
implements NoSqlQueryForListStatement<MongoLiquibaseDatabase,String>
Gets a list of collection names via the database runCommand method
For a list of supported options see the reference page:
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class liquibase.ext.mongodb.statement.AbstractRunCommandStatement
command, COMMAND_NAME, OK, SHELL_DB_PREFIX, WRITE_ERRORSFields inherited from interface liquibase.statement.SqlStatement
EMPTY_SQL_STATEMENT -
Constructor Summary
ConstructorsConstructorDescriptionCreate a listCollections statement with no filter.ListCollectionNamesStatement(org.bson.Document filter) Create a listCollections statement with the supplied filter. -
Method Summary
Modifier and TypeMethodDescriptionReturns the RunCommand command name.queryForList(MongoLiquibaseDatabase database) Methods inherited from class liquibase.ext.mongodb.statement.AbstractRunCommandStatement
checkResponse, execute, getCommandName, run, run, toJsMethods inherited from class liquibase.nosql.statement.AbstractNoSqlStatement
continueOnError, skipOnUnsupported, toStringMethods inherited from class liquibase.statement.AbstractSqlStatement
setContinueOnError
-
Field Details
-
FILTER
- See Also:
-
CURSOR
- See Also:
-
FIRST_BATCH
- See Also:
-
NAME
- See Also:
-
AUTHORIZED_COLLECTIONS
- See Also:
-
NAME_ONLY
- See Also:
-
-
Constructor Details
-
ListCollectionNamesStatement
public ListCollectionNamesStatement()Create a listCollections statement with no filter. i.e to return all collection names -
ListCollectionNamesStatement
public ListCollectionNamesStatement(org.bson.Document filter) Create a listCollections statement with the supplied filter.- Parameters:
filter- the filter to apply
-
-
Method Details
-
getRunCommandName
Description copied from class:AbstractRunCommandStatementReturns the RunCommand command name.- Specified by:
getRunCommandNamein classAbstractRunCommandStatement- Returns:
- the run command as this is not used and not required for a generic RunCommandStatement
- See Also:
-
queryForList
- Specified by:
queryForListin interfaceNoSqlQueryForListStatement<MongoLiquibaseDatabase,String>
-