Package ch.ergon.adam.postgresql
Class PostgreSqlSink
java.lang.Object
ch.ergon.adam.jooq.JooqSink
ch.ergon.adam.postgresql.PostgreSqlSink
- All Implemented Interfaces:
ch.ergon.adam.core.db.interfaces.SchemaSink,AutoCloseable
public class PostgreSqlSink
extends ch.ergon.adam.jooq.JooqSink
-
Field Summary
Fields inherited from class ch.ergon.adam.jooq.JooqSink
context, schema -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcastIfNeeded(ch.ergon.adam.core.db.schema.Field sourceField, ch.ergon.adam.core.db.schema.Field targetField, org.jooq.DSLContext renderContext) voidchangeFieldType(ch.ergon.adam.core.db.schema.Field oldField, ch.ergon.adam.core.db.schema.Field newField, ch.ergon.adam.core.db.schema.DataType targetDataType) voidcopyData(ch.ergon.adam.core.db.schema.Table sourceTable, ch.ergon.adam.core.db.schema.Table targetTable, String sourceTableName) voidcreateEnum(ch.ergon.adam.core.db.schema.DbEnum dbEnum) voiddropEnum(ch.ergon.adam.core.db.schema.DbEnum dbEnum) voiddropSequence(ch.ergon.adam.core.db.schema.Sequence sequence) voiddropSequencesAndDefaults(ch.ergon.adam.core.db.schema.Table table) protected org.jooq.DataType<?> mapFieldToJooqType(ch.ergon.adam.core.db.schema.Field field) protected org.jooq.DataType<?> mapType(ch.ergon.adam.core.db.schema.Field field) Methods inherited from class ch.ergon.adam.jooq.JooqSink
addField, adjustSequences, close, commitChanges, createConstraint, createForeignKey, createIndex, createSequence, createTable, createView, dropConstraint, dropDefault, dropField, dropForeignKey, dropIndex, dropTable, dropView, getDefaultValue, getFieldName, getTableName, mapRawType, renameTable, rollback, setDefault, setTargetSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.ergon.adam.core.db.interfaces.SchemaSink
supportAlterAndDropField
-
Constructor Details
-
PostgreSqlSink
-
-
Method Details
-
dropEnum
public void dropEnum(ch.ergon.adam.core.db.schema.DbEnum dbEnum) - Specified by:
dropEnumin interfacech.ergon.adam.core.db.interfaces.SchemaSink- Overrides:
dropEnumin classch.ergon.adam.jooq.JooqSink
-
createEnum
public void createEnum(ch.ergon.adam.core.db.schema.DbEnum dbEnum) - Specified by:
createEnumin interfacech.ergon.adam.core.db.interfaces.SchemaSink- Overrides:
createEnumin classch.ergon.adam.jooq.JooqSink
-
changeFieldType
public void changeFieldType(ch.ergon.adam.core.db.schema.Field oldField, ch.ergon.adam.core.db.schema.Field newField, ch.ergon.adam.core.db.schema.DataType targetDataType) - Specified by:
changeFieldTypein interfacech.ergon.adam.core.db.interfaces.SchemaSink- Overrides:
changeFieldTypein classch.ergon.adam.jooq.JooqSink
-
mapType
protected org.jooq.DataType<?> mapType(ch.ergon.adam.core.db.schema.Field field) - Overrides:
mapTypein classch.ergon.adam.jooq.JooqSink
-
mapFieldToJooqType
protected org.jooq.DataType<?> mapFieldToJooqType(ch.ergon.adam.core.db.schema.Field field) - Overrides:
mapFieldToJooqTypein classch.ergon.adam.jooq.JooqSink
-
copyData
public void copyData(ch.ergon.adam.core.db.schema.Table sourceTable, ch.ergon.adam.core.db.schema.Table targetTable, String sourceTableName) - Specified by:
copyDatain interfacech.ergon.adam.core.db.interfaces.SchemaSink- Overrides:
copyDatain classch.ergon.adam.jooq.JooqSink
-
castIfNeeded
protected String castIfNeeded(ch.ergon.adam.core.db.schema.Field sourceField, ch.ergon.adam.core.db.schema.Field targetField, org.jooq.DSLContext renderContext) - Overrides:
castIfNeededin classch.ergon.adam.jooq.JooqSink
-
dropSequencesAndDefaults
public void dropSequencesAndDefaults(ch.ergon.adam.core.db.schema.Table table) - Specified by:
dropSequencesAndDefaultsin interfacech.ergon.adam.core.db.interfaces.SchemaSink- Overrides:
dropSequencesAndDefaultsin classch.ergon.adam.jooq.JooqSink
-
dropSequence
public void dropSequence(ch.ergon.adam.core.db.schema.Sequence sequence) - Specified by:
dropSequencein interfacech.ergon.adam.core.db.interfaces.SchemaSink- Overrides:
dropSequencein classch.ergon.adam.jooq.JooqSink
-