Class DistributedSchemaAdapter
- java.lang.Object
-
- org.linuxforhealth.fhir.database.utils.common.PlainSchemaAdapter
-
- org.linuxforhealth.fhir.schema.build.DistributedSchemaAdapter
-
- All Implemented Interfaces:
ISchemaAdapter
public class DistributedSchemaAdapter extends PlainSchemaAdapter
Represents an adapter used to build the FHIR schema when used with a distributed databse like Citus
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.database.utils.common.PlainSchemaAdapter
databaseAdapter
-
-
Constructor Summary
Constructors Constructor Description DistributedSchemaAdapter(IDatabaseAdapter databaseAdapter, java.lang.String defaultDistributionColumnName)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyDistributionRules(java.lang.String schemaName, java.lang.String tableName, DistributionType distributionType, java.lang.String distributionColumnName)
Apply any distribution rules configured for the named tablevoid
createTable(java.lang.String schemaName, java.lang.String name, java.util.List<ColumnBase> columns, PrimaryKeyDef primaryKey, IdentityDef identity, java.lang.String tablespaceName, java.util.List<With> withs, java.util.List<CheckConstraint> checkConstraints, DistributionType distributionType, java.lang.String distributionColumnName)
Build the create table DDLvoid
createUniqueIndex(java.lang.String schemaName, java.lang.String tableName, java.lang.String indexName, java.util.List<OrderedColumnDef> indexColumns, java.util.List<java.lang.String> includeColumns, DistributionType distributionType, java.lang.String distributionColumnName)
Create a unique indexvoid
createUniqueIndex(java.lang.String schemaName, java.lang.String tableName, java.lang.String indexName, java.util.List<OrderedColumnDef> indexColumns, DistributionType distributionType, java.lang.String distributionColumnName)
Create a unique index-
Methods inherited from class org.linuxforhealth.fhir.database.utils.common.PlainSchemaAdapter
alterSequenceRestartWith, alterTableAddColumn, alterTableColumnIdentityCache, checkCompatibility, createForeignKeyConstraint, createIndex, createOrReplaceFunction, createOrReplaceProcedure, createOrReplaceView, createSchema, createSequence, createTablespace, createTablespace, createUniqueConstraint, createView, disableForeignKey, distributeFunction, doesForeignKeyConstraintExist, doesTableExist, dropForeignKey, dropFunction, dropIndex, dropProcedure, dropSequence, dropTable, dropTablespace, dropView, enableForeignKey, grantAllSequenceUsage, grantFunctionPrivileges, grantObjectPrivileges, grantProcedurePrivileges, grantSchemaUsage, grantSequencePrivileges, grantVariablePrivileges, listSchemaObjects, runStatement, setIntegrityOff, setIntegrityUnchecked
-
-
-
-
Constructor Detail
-
DistributedSchemaAdapter
public DistributedSchemaAdapter(IDatabaseAdapter databaseAdapter, java.lang.String defaultDistributionColumnName)
Public constructor- Parameters:
databaseAdapter
-
-
-
Method Detail
-
createTable
public void createTable(java.lang.String schemaName, java.lang.String name, java.util.List<ColumnBase> columns, PrimaryKeyDef primaryKey, IdentityDef identity, java.lang.String tablespaceName, java.util.List<With> withs, java.util.List<CheckConstraint> checkConstraints, DistributionType distributionType, java.lang.String distributionColumnName)
Description copied from interface:ISchemaAdapter
Build the create table DDL- Specified by:
createTable
in interfaceISchemaAdapter
- Overrides:
createTable
in classPlainSchemaAdapter
-
createUniqueIndex
public void createUniqueIndex(java.lang.String schemaName, java.lang.String tableName, java.lang.String indexName, java.util.List<OrderedColumnDef> indexColumns, java.util.List<java.lang.String> includeColumns, DistributionType distributionType, java.lang.String distributionColumnName)
Description copied from interface:ISchemaAdapter
Create a unique index- Specified by:
createUniqueIndex
in interfaceISchemaAdapter
- Overrides:
createUniqueIndex
in classPlainSchemaAdapter
-
createUniqueIndex
public void createUniqueIndex(java.lang.String schemaName, java.lang.String tableName, java.lang.String indexName, java.util.List<OrderedColumnDef> indexColumns, DistributionType distributionType, java.lang.String distributionColumnName)
Description copied from interface:ISchemaAdapter
Create a unique index- Specified by:
createUniqueIndex
in interfaceISchemaAdapter
- Overrides:
createUniqueIndex
in classPlainSchemaAdapter
-
applyDistributionRules
public void applyDistributionRules(java.lang.String schemaName, java.lang.String tableName, DistributionType distributionType, java.lang.String distributionColumnName)
Description copied from interface:ISchemaAdapter
Apply any distribution rules configured for the named table- Specified by:
applyDistributionRules
in interfaceISchemaAdapter
- Overrides:
applyDistributionRules
in classPlainSchemaAdapter
-
-