Package lu.kbra.pclib.db.domain.dialect
Class AbstractSQLStructureVisitor
java.lang.Object
lu.kbra.pclib.db.domain.dialect.AbstractSQLStructureVisitor
- All Implemented Interfaces:
SQLStructureVisitor
- Direct Known Subclasses:
MySQLStructureVisitor,PostgreSQLStructureVisitor,SQLiteStructureVisitor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendWhereGroupOrder(StringBuilder sql, String condition, List<String> groupBy, List<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 Stringprotected StringbuildSelectBody(ViewStructure view) protected StringbuildUnionSQL(UnionTableStructure table) protected String<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 abstract Stringprotected ColumnDataprotected final Map<DbmsCapability,Boolean> <B extends SQLQueryable<T>,T extends DataBaseEntry>
StringgetQueryableName(Class<B> tableClass, Map<String, Object> queryableHints) booleanisRawExpression(String identifier) protected StringjoinKeyword(ViewJoinType joinType) <B extends SQLQueryable<T>,T extends DataBaseEntry>
StringqualifiedName(Class<B> tableClass, Map<String, Object> queryableHints) qualifiedName(String value) protected Stringprotected String<B extends AbstractDBTable<T>,T extends DataBaseEntry>
StringsafeDelete(B table, String[] pkNames) <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[] 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) protected final voidsetCapability(DbmsCapability capability, boolean supported) protected final booleansupports(DbmsCapability capability) 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, qualifiedName, schemaName
-
Constructor Details
-
AbstractSQLStructureVisitor
protected AbstractSQLStructureVisitor()
-
-
Method Details
-
count
- Specified by:
countin interfaceSQLStructureVisitor
-
qualifiedName
public <B extends SQLQueryable<T>,T extends DataBaseEntry> String qualifiedName(Class<B> tableClass, Map<String, Object> queryableHints) - Specified by:
qualifiedNamein interfaceSQLStructureVisitor
-
create
- Specified by:
createin interfaceSQLStructureVisitor
-
qualifiedStructureName
-
create
- Specified by:
createin interfaceSQLStructureVisitor
-
create
- Specified by:
createin interfaceSQLStructureVisitor
-
qualifiedStructureName
-
drop
- Specified by:
dropin interfaceSQLStructureVisitor
-
drop
- Specified by:
dropin interfaceSQLStructureVisitor
-
drop
- Specified by:
dropin interfaceSQLStructureVisitor
-
isRawExpression
-
qualifiedName
- Specified by:
qualifiedNamein interfaceSQLStructureVisitor
-
safeDelete
public <B extends AbstractDBTable<T>,T extends DataBaseEntry> String safeDelete(B table, String[] pkNames) - 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[] 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
-
appendWhereGroupOrder
protected void appendWhereGroupOrder(StringBuilder sql, String condition, List<String> groupBy, List<ViewOrderStructure> orderBy) -
buildAlias
-
buildColumn
-
buildColumnSQL
-
buildColumnSQL
-
buildColumnSQL
-
buildConstraint
-
buildForeignKey
-
buildGeneratedColumn
-
buildSelectBody
-
buildUnionSQL
-
buildWithSQL
-
escapeEnd
-
escapeList
-
escapeStart
-
findInlinePrimaryKey
-
getCapabilities
-
joinKeyword
-
setCapability
-
supports
-
getQueryableName
public <B extends SQLQueryable<T>,T extends DataBaseEntry> String getQueryableName(Class<B> tableClass, Map<String, Object> queryableHints) - Specified by:
getQueryableNamein interfaceSQLStructureVisitor
-