Class DDLSchemaFeature
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.localdb.DDLSchemaFeature
-
- All Implemented Interfaces:
SchemaFeature
public class DDLSchemaFeature extends java.lang.Object implements SchemaFeature
A very simple implementation of SchemaFeature that simply runs a sequence of DDL queries
-
-
Constructor Summary
Constructors Constructor Description DDLSchemaFeature(java.lang.String key, InternalDBFlavor dbFlavor, java.lang.String... commands)
DDLSchemaFeature(java.lang.String key, java.lang.String... commands)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(DBInterface db)
If the given schema feature is not present in the database, this will be calledInternalDBFlavor
dbFlavor()
If a schema feature is only pertinent to a particular internal db flavor, it can return it here.java.lang.String
getFeatureKey()
A module-specific key for the named feature
-
-
-
Constructor Detail
-
DDLSchemaFeature
public DDLSchemaFeature(java.lang.String key, java.lang.String... commands)
-
DDLSchemaFeature
public DDLSchemaFeature(java.lang.String key, InternalDBFlavor dbFlavor, java.lang.String... commands)
-
-
Method Detail
-
apply
public void apply(DBInterface db) throws java.sql.SQLException
Description copied from interface:SchemaFeature
If the given schema feature is not present in the database, this will be called- Specified by:
apply
in interfaceSchemaFeature
- Throws:
java.sql.SQLException
-
getFeatureKey
public java.lang.String getFeatureKey()
Description copied from interface:SchemaFeature
A module-specific key for the named feature- Specified by:
getFeatureKey
in interfaceSchemaFeature
-
dbFlavor
public InternalDBFlavor dbFlavor()
Description copied from interface:SchemaFeature
If a schema feature is only pertinent to a particular internal db flavor, it can return it here. Otherwise, "Not_Defined" is retuned by default and will apply to all internal databases.- Specified by:
dbFlavor
in interfaceSchemaFeature
-
-