Class SchemaBuilder
java.lang.Object
com.valqueries.automapper.context.schema.SchemaBuilder
- All Implemented Interfaces:
- ISchemaBuilder,- AutoCloseable
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAlter an existing table.alterIfExists(Token table) Alter an existing table if it exists.voidclose()booleancolumnExists(Token table, Token column) Check if a column exists.Create a new table.voidcreateDatabaseAndUser(String databaseName, String username, String password) Creates a new database and user.createIfNotExists(Token table) Create a new table if it does not already exist.voidDrop an existing table.voiddropIfExists(Token table) Drop an existing table if it exists.booleanCheck if a table exists.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.valqueries.automapper.context.schema.ISchemaBuilderalter, alterIfExists, columnExists, create, createIfNotExists, drop, dropIfExists, exists
- 
Constructor Details- 
SchemaBuilder
 
- 
- 
Method Details- 
createDescription copied from interface:ISchemaBuilderCreate a new table. Will fail if a table with the same name already exists.Note: remember to call IBaseBuilder.execute()- Specified by:
- createin interface- ISchemaBuilder
- Parameters:
- table- that will be created.
- Returns:
- a builder that can be used to build the new table.
 
- 
createIfNotExistsDescription copied from interface:ISchemaBuilderCreate a new table if it does not already exist. Does nothing if a table with the same name already exists, no matter its contents.Note: remember to call IBaseBuilder.execute()- Specified by:
- createIfNotExistsin interface- ISchemaBuilder
- Parameters:
- table- that will be created if not already.
- Returns:
- a builder that can be used to build the new table.
 
- 
alterDescription copied from interface:ISchemaBuilderAlter an existing table.Note: remember to call IBaseBuilder.execute()- Specified by:
- alterin interface- ISchemaBuilder
- Parameters:
- table- that will be altered.
- Returns:
- a builder that can be used to alter the table.
 
- 
alterIfExistsDescription copied from interface:ISchemaBuilderAlter an existing table if it exists.Note: remember to call IBaseBuilder.execute()- Specified by:
- alterIfExistsin interface- ISchemaBuilder
- Parameters:
- table- that will be altered if it exists.
- Returns:
- a builder that can be used to alter the table.
 
- 
dropDescription copied from interface:ISchemaBuilderDrop an existing table.- Specified by:
- dropin interface- ISchemaBuilder
- Parameters:
- table- that will be dropped.
 
- 
dropIfExistsDescription copied from interface:ISchemaBuilderDrop an existing table if it exists.- Specified by:
- dropIfExistsin interface- ISchemaBuilder
- Parameters:
- table- that will be dropped.
 
- 
existsDescription copied from interface:ISchemaBuilderCheck if a table exists.- Specified by:
- existsin interface- ISchemaBuilder
- Parameters:
- table- to be checked
- Returns:
- true if the table exists, false otherwise
 
- 
columnExistsDescription copied from interface:ISchemaBuilderCheck if a column exists.- Specified by:
- columnExistsin interface- ISchemaBuilder
- Parameters:
- table- the table to check in
- column- the column to be checked
- Returns:
- true if the column exists, false otherwise
 
- 
createDatabaseAndUserDescription copied from interface:ISchemaBuilderCreates a new database and user. The user will be granted all privileges on the database.- Specified by:
- createDatabaseAndUserin interface- ISchemaBuilder
- Parameters:
- databaseName- The name of the database to create
- username- The name of the user to create
- password- The password of the user to create
 
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- ISchemaBuilder
 
 
-