Package lu.kbra.pclib.db.domain.dialect
Class AbstractSQLStructureVisitor
java.lang.Object
lu.kbra.pclib.db.domain.dialect.AbstractSQLStructureVisitor
- All Implemented Interfaces:
SQLStructureVisitor,SQLStructureVisitorOptionsOwner
- Direct Known Subclasses:
MySQLStructureVisitor,PostgreSQLStructureVisitor,SQLiteStructureVisitor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendWhereGroupOrder(StringBuilder sql, String condition, String[] groupBy, ViewOrderStructure[] orderBy) protected StringbuildAlias(ViewColumnStructure column) protected StringbuildColumn(TableStructure table, ColumnData column, boolean inlinePrimaryKey) protected StringbuildColumnSQL(UnionTableStructure table, ViewColumnStructure column) protected StringbuildColumnSQL(ViewColumnStructure column) protected StringbuildColumnSQL(ViewTableStructure table, ViewColumnStructure column) protected StringbuildConstraint(ConstraintData constraint) protected Stringprotected StringbuildGeneratedColumn(ColumnData column) buildParameterQuerySql(SQLQueryable<?> instance, List<DefaultSQLQueryFunctionProvider.ParameterQueryPart> whereParts, List<String> orderByParts, DefaultSQLQueryFunctionProvider.ParameterQueryPart limitPart, DefaultSQLQueryFunctionProvider.ParameterQueryPart offsetPart, DefaultSQLQueryFunctionProvider.ReturnMapping returnMapping) protected StringbuildSelectBody(ViewStructure view) protected StringbuildUnionSQL(UnionTableStructure table) protected Stringprotected Stringcast(EncodingType<?> encodingType) <B extends SQLQueryable<T>,T extends DatabaseEntry>
Stringcount(B queryable) String[]create(TableStructure table) create(TableStructure table, ColumnData column) String[]create(ViewStructure view) drop(DatabaseStructure databaseStructure) drop(TableStructure tableStructure) drop(ViewStructure tableStructure) protected abstract Stringprotected StringescapeList(String[] columns) protected StringescapeList(ColumnData[] columns) protected abstract Stringprotected ColumnDatafinal Map<DbmsCapability,Boolean> getQueryableName(Class<? extends SQLQueryable<?>> tableClass, Map<String, Object> queryableHints) String[]getQueryableNameParts(Class<? extends SQLQueryable<?>> tableClass, Map<String, Object> queryableHints) <T extends DatabaseEntry>
StringgetTruncateSQL(AbstractDBTable<T> queryable) booleanisRawExpression(String identifier) protected StringjoinKeyword(ViewTable.Type joinType) qualifiedName(Class<? extends SQLQueryable<?>> tableClass, Map<String, Object> queryableHints) qualifiedName(String value) protected Stringprotected String<B extends AbstractDBTable<T>,T extends DatabaseEntry>
StringsafeDelete(B table, String[] whereColumns) <B extends AbstractDBTable<T>,T extends DatabaseEntry>
StringsafeDelete(B table, String[] whereColumns, int count) <B extends AbstractDBTable<T>,T extends DatabaseEntry>
StringsafeInsert(B table, String[] columns) <B extends SQLQueryable<T>,T extends DatabaseEntry>
StringsafeSelect(B table, String[] whereColumns) <B extends SQLQueryable<T>,T extends DatabaseEntry>
StringsafeSelect(B table, String[] whereColumns, int count) <B extends SQLQueryable<T>,T extends DatabaseEntry>
StringsafeSelect(B table, String[] columns, String[] whereColumns) <B extends SQLQueryable<T>,T extends DatabaseEntry>
StringsafeSelect(SQLQueryable<T> instance, String[] whereColumns, boolean limit, boolean offset) <B extends SQLQueryable<T>,T extends DatabaseEntry>
StringsafeSelect(SQLQueryable<T> instance, String[] columns, String[] whereColumns, boolean limit, boolean offset) <B extends SQLQueryable<T>,T extends DatabaseEntry>
StringsafeSelectCountUniqueCollision(B instance, String[][] whereColumns) <B extends SQLQueryable<T>,T extends DatabaseEntry>
StringsafeSelectUniqueCollision(B instance, String[][] uniqueKeys) <B extends AbstractDBTable<T>,T extends DatabaseEntry>
StringsafeUpdate(B table, String[] setColumns, String[] whereColumns) <B extends AbstractDBTable<T>,T extends DatabaseEntry>
StringsafeUpdateExpr(B table, String[] setColumns, String[] whereColumns) protected final voidsetCapability(DbmsCapability capability, boolean supported) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface lu.kbra.pclib.db.domain.dialect.SQLStructureVisitor
create, fieldToColumnName, qualifiedName, schemaName, supportsMethods inherited from interface lu.kbra.pclib.db.domain.dialect.SQLStructureVisitorOptionsOwner
getOption, getOptionOrDefault, getOptionOrDefault, hasOption, setOption, unsertOption
-
Constructor Details
-
AbstractSQLStructureVisitor
protected AbstractSQLStructureVisitor()
-
-
Method Details
-
buildParameterQuerySql
public String buildParameterQuerySql(SQLQueryable<?> instance, List<DefaultSQLQueryFunctionProvider.ParameterQueryPart> whereParts, List<String> orderByParts, DefaultSQLQueryFunctionProvider.ParameterQueryPart limitPart, DefaultSQLQueryFunctionProvider.ParameterQueryPart offsetPart, DefaultSQLQueryFunctionProvider.ReturnMapping returnMapping) - Specified by:
buildParameterQuerySqlin interfaceSQLStructureVisitor
-
cast
-
count
- Specified by:
countin interfaceSQLStructureVisitor
-
create
- Specified by:
createin interfaceSQLStructureVisitor
-
create
- Specified by:
createin interfaceSQLStructureVisitor
-
create
- Specified by:
createin interfaceSQLStructureVisitor
-
drop
- Specified by:
dropin interfaceSQLStructureVisitor
-
drop
- Specified by:
dropin interfaceSQLStructureVisitor
-
drop
- Specified by:
dropin interfaceSQLStructureVisitor
-
getOptions
- Specified by:
getOptionsin interfaceSQLStructureVisitorOptionsOwner
-
getQueryableName
public String getQueryableName(Class<? extends SQLQueryable<?>> tableClass, Map<String, Object> queryableHints) - Specified by:
getQueryableNamein interfaceSQLStructureVisitor
-
getQueryableNameParts
public String[] getQueryableNameParts(Class<? extends SQLQueryable<?>> tableClass, Map<String, Object> queryableHints) - Specified by:
getQueryableNamePartsin interfaceSQLStructureVisitor
-
getTruncateSQL
- Specified by:
getTruncateSQLin interfaceSQLStructureVisitor
-
isRawExpression
-
qualifiedName
public String qualifiedName(Class<? extends SQLQueryable<?>> tableClass, Map<String, Object> queryableHints) - Specified by:
qualifiedNamein interfaceSQLStructureVisitor
-
qualifiedName
- Specified by:
qualifiedNamein interfaceSQLStructureVisitor
-
safeDelete
public <B extends AbstractDBTable<T>,T extends DatabaseEntry> String safeDelete(B table, String[] whereColumns) - Specified by:
safeDeletein interfaceSQLStructureVisitor
-
safeDelete
public <B extends AbstractDBTable<T>,T extends DatabaseEntry> String safeDelete(B table, String[] whereColumns, int count) - Specified by:
safeDeletein interfaceSQLStructureVisitor
-
safeInsert
public <B extends AbstractDBTable<T>,T extends DatabaseEntry> String safeInsert(B table, String[] columns) - Specified by:
safeInsertin interfaceSQLStructureVisitor
-
safeSelect
public <B extends SQLQueryable<T>,T extends DatabaseEntry> String safeSelect(B table, String[] whereColumns) - Specified by:
safeSelectin interfaceSQLStructureVisitor
-
safeSelect
public <B extends SQLQueryable<T>,T extends DatabaseEntry> String safeSelect(B table, String[] whereColumns, int count) - Specified by:
safeSelectin interfaceSQLStructureVisitor
-
safeSelect
public <B extends SQLQueryable<T>,T extends DatabaseEntry> String safeSelect(B table, String[] columns, String[] whereColumns) - Specified by:
safeSelectin interfaceSQLStructureVisitor
-
safeSelect
public <B extends SQLQueryable<T>,T extends DatabaseEntry> String safeSelect(SQLQueryable<T> instance, String[] whereColumns, boolean limit, boolean offset) - Specified by:
safeSelectin interfaceSQLStructureVisitor
-
safeSelect
public <B extends SQLQueryable<T>,T extends DatabaseEntry> String safeSelect(SQLQueryable<T> instance, String[] columns, String[] whereColumns, boolean limit, boolean offset) - Specified by:
safeSelectin interfaceSQLStructureVisitor
-
safeSelectCountUniqueCollision
public <B extends SQLQueryable<T>,T extends DatabaseEntry> String safeSelectCountUniqueCollision(B instance, String[][] whereColumns) - Specified by:
safeSelectCountUniqueCollisionin interfaceSQLStructureVisitor
-
safeSelectUniqueCollision
public <B extends SQLQueryable<T>,T extends DatabaseEntry> String safeSelectUniqueCollision(B instance, String[][] uniqueKeys) - Specified by:
safeSelectUniqueCollisionin interfaceSQLStructureVisitor
-
safeUpdate
public <B extends AbstractDBTable<T>,T extends DatabaseEntry> String safeUpdate(B table, String[] setColumns, String[] whereColumns) - Specified by:
safeUpdatein interfaceSQLStructureVisitor
-
safeUpdateExpr
public <B extends AbstractDBTable<T>,T extends DatabaseEntry> String safeUpdateExpr(B table, String[] setColumns, String[] whereColumns) - Specified by:
safeUpdateExprin interfaceSQLStructureVisitor
-
appendWhereGroupOrder
protected void appendWhereGroupOrder(StringBuilder sql, String condition, String[] groupBy, ViewOrderStructure[] orderBy) -
buildAlias
-
buildColumn
-
buildColumnSQL
-
buildColumnSQL
-
buildColumnSQL
-
buildConstraint
-
buildForeignKey
-
buildGeneratedColumn
-
buildSelectBody
-
buildUnionSQL
-
buildWithSQL
-
escapeEnd
-
escapeList
-
escapeList
-
escapeStart
-
findInlinePrimaryKey
-
getCapabilities
- Specified by:
getCapabilitiesin interfaceSQLStructureVisitor
-
joinKeyword
-
qualifiedStructureName
-
qualifiedStructureName
-
setCapability
-