Class DatabaseMetaBuilder
java.lang.Object
org.nuiton.db.meta.DatabaseMetaBuilder
- Since:
- 0.1
- Author:
- Arnaud Thimel (Code Lutin)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDatabaseMetaBuilder(Connection sqlConnection) DatabaseMetaBuilder(Connection sqlConnection, String packageForEnumResolver) DatabaseMetaBuilder(Consumer<SqlWork> worker, String packageForEnumResolver) -
Method Summary
Modifier and TypeMethodDescriptionprotected ColumnRefasCommentKey(String tableName, String columnName) protected ColumnRefasProcedureKey(String procedureName, String argTypesString) protected voidprotected com.google.common.collect.ImmutableSet<String> getColumnNames(String schema, String tableName) protected com.google.common.collect.ImmutableSet<String> getForeignKeys(com.google.common.collect.Multimap<ColumnRef, ColumnRef> foreignKeys, ColumnRef columnRef) protected com.google.common.collect.ImmutableSet<String> getTableNames(String schema, String type) protected com.google.common.collect.ImmutableList<CustomTypeMeta> readCustomTypesComments(String schema) readForeignKeys(String schema) Dans la Multimap renvoyée, la clé est constituée d'une Pair de TABLE_NAME, COLUMN_NAME.protected com.google.common.collect.ImmutableSet<ColumnRef> readPrimaryKeys(String schema) Renvoie un ensemble de Pair de TABLE_NAME, COLUMN_NAME représentant les clés primaires de la base.readProcedureComments(String schema) Dans la Map renvoyée, la clé est constituée d'une Pair de PROCEDURE_NAME, ATTRIBUTE_NAME.protected com.google.common.collect.ImmutableList<ProcedureMeta> readProcedureMetas(String schema) readTableAndViewComments(String schema) Dans la Map renvoyée, la clé est constituée d'une Pair de TABLE_NAME, COLUMN_NAME.protected com.google.common.collect.ImmutableList<TableMeta> readTableMetas(String schema, com.google.common.collect.ImmutableList<CustomTypeMeta> customTypes) protected com.google.common.collect.ImmutableList<TableMeta> readTableMetas(String type, String schema, Map<ColumnRef, String> comments, Set<ColumnRef> primaryKeys, Set<ColumnRef> uniqueColumns, com.google.common.collect.Multimap<ColumnRef, ColumnRef> foreignKeys, com.google.common.collect.ImmutableList<CustomTypeMeta> customTypes) protected com.google.common.collect.ImmutableSet<ColumnRef> readUniqueColumns(String schema) Renvoie un ensemble de Pair de TABLE_NAME, COLUMN_NAME représentant les colonnes avec une contrainte d'unicité.protected com.google.common.collect.ImmutableList<TableMeta> readViewMetas(String schema, com.google.common.collect.ImmutableList<CustomTypeMeta> customTypes)
-
Field Details
-
POSSIBLE_VALUES_PATTERN
-
metaCountCache
-
worker
-
packageForEnumResolver
-
-
Constructor Details
-
DatabaseMetaBuilder
-
DatabaseMetaBuilder
-
DatabaseMetaBuilder
-
-
Method Details
-
getMetaCountCache
-
doWork
-
getTableNames
-
getColumnNames
-
readTableMetas
protected com.google.common.collect.ImmutableList<TableMeta> readTableMetas(String type, String schema, Map<ColumnRef, String> comments, Set<ColumnRef> primaryKeys, Set<ColumnRef> uniqueColumns, com.google.common.collect.Multimap<ColumnRef, ColumnRef> foreignKeys, com.google.common.collect.ImmutableList<CustomTypeMeta> customTypes) -
getForeignKeys
-
asCommentKey
-
asProcedureKey
-
readTableAndViewComments
-
readProcedureComments
-
readProcedureMetas
-
readForeignKeys
-
readPrimaryKeys
-
readUniqueColumns
-
readTableMetas
protected com.google.common.collect.ImmutableList<TableMeta> readTableMetas(String schema, com.google.common.collect.ImmutableList<CustomTypeMeta> customTypes) -
readViewMetas
protected com.google.common.collect.ImmutableList<TableMeta> readViewMetas(String schema, com.google.common.collect.ImmutableList<CustomTypeMeta> customTypes) -
readCustomTypesComments
-
readCustomTypes
-
packageEnumResolver
-
buildMeta
-