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:
- listCollections
-
-
Field Summary
Fields Modifier and Type Field Description static StringAUTHORIZED_COLLECTIONSstatic StringCURSORstatic StringFILTERstatic StringFIRST_BATCHstatic StringNAMEstatic StringNAME_ONLY-
Fields inherited from class liquibase.ext.mongodb.statement.AbstractRunCommandStatement
command, COMMAND_NAME, OK, SHELL_DB_PREFIX, WRITE_ERRORS
-
-
Constructor Summary
Constructors Constructor Description ListCollectionNamesStatement()Create a listCollections statement with no filter.ListCollectionNamesStatement(org.bson.Document filter)Create a listCollections statement with the supplied filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetRunCommandName()Returns the RunCommand command name.List<String>queryForList(MongoLiquibaseDatabase database)-
Methods inherited from class liquibase.ext.mongodb.statement.AbstractRunCommandStatement
checkResponse, execute, getCommandName, run, run, toJs
-
Methods inherited from class liquibase.nosql.statement.AbstractNoSqlStatement
continueOnError, skipOnUnsupported, toString
-
-
-
-
Field Detail
-
FILTER
public static final String FILTER
- See Also:
- Constant Field Values
-
CURSOR
public static final String CURSOR
- See Also:
- Constant Field Values
-
FIRST_BATCH
public static final String FIRST_BATCH
- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
AUTHORIZED_COLLECTIONS
public static final String AUTHORIZED_COLLECTIONS
- See Also:
- Constant Field Values
-
NAME_ONLY
public static final String NAME_ONLY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
getRunCommandName
public String 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:
- Database Commands
-
queryForList
public List<String> queryForList(MongoLiquibaseDatabase database)
- Specified by:
queryForListin interfaceNoSqlQueryForListStatement<MongoLiquibaseDatabase,String>
-
-