@Test public void escapeTableName_withSchema() { Database database = getDatabase(); assertEquals("schemaName.tableName", database.escapeTableName("schemaName", "tableName")); }
public String escapeTableName(String schemaName, String tableName) { if (schemaName == null) { schemaName = getDefaultSchemaName(); } if (StringUtils.trimToNull(schemaName) == null || !supportsSchemas()) { return escapeDatabaseObject(tableName); } else { return escapeDatabaseObject(schemaName) + "." + escapeDatabaseObject(tableName); } }
AbstractDatabase implements Database { public String escapeTableName(String schemaName, String tableName) { if (schemaName == null) { schemaName = getDefaultSchemaName(); } if (StringUtils.trimToNull(schemaName) == null || !supportsSchemas()) { return escapeDatabaseObject(tableName); } else { return escapeDatabaseObject(schemaName) + "." + escapeDatabaseObject(tableName); } } }
AbstractDatabase implements Database { public String escapeTableName(String schemaName, String tableName) { if (schemaName == null) { schemaName = getDefaultSchemaName(); } if (StringUtils.trimToNull(schemaName) == null || !supportsSchemas()) { return escapeDatabaseObject(tableName); } else { return escapeDatabaseObject(schemaName) + "." + escapeDatabaseObject(tableName); } } protected  AbstractDatabase(); }
AbstractDatabase implements Database { public String escapeTableName(String schemaName, String tableName) { if (schemaName == null) { schemaName = getDefaultSchemaName(); } if (StringUtils.trimToNull(schemaName) == null || !supportsSchemas()) { return escapeDatabaseObject(tableName); } else { return escapeDatabaseObject(schemaName) + "." + escapeDatabaseObject(tableName); } } protected  AbstractDatabase(); boolean requiresPassword(); boolean requiresUsername(); DatabaseObject[] getContainingObjects(); DatabaseConnection getConnection(); void setConnection(DatabaseConnection conn); boolean getAutoCommitMode(); boolean supportsDDLInTransaction(); String getDatabaseProductName(); String getDatabaseProductVersion(); int getDatabaseMajorVersion(); int getDatabaseMinorVersion(); String getDefaultCatalogName(); String getDefaultSchemaName(); void setDefaultSchemaName(String schemaName); boolean supportsSequences(); boolean supportsAutoIncrement(); void setCurrentDateTimeFunction(String function); String getDateLiteral(String isoDate); String getDateTimeLiteral(java.sql.Timestamp date); String getDateLiteral(java.sql.Date date); String getTimeLiteral(java.sql.Time date); String getDateLiteral(Date date); Date parseDate(String dateAsString); String getLineComment(); String getAutoIncrementClause(BigInteger startWith, BigInteger incrementBy); String getConcatSql(String... values); String getDatabaseChangeLogTableName(); String getDatabaseChangeLogLockTableName(); void setDatabaseChangeLogTableName(String tableName); void setDatabaseChangeLogLockTableName(String tableName); void checkDatabaseChangeLogTable(boolean updateExistingNullChecksums, DatabaseChangeLog databaseChangeLog, String... contexts); void setCanCacheLiquibaseTableInfo(boolean canCacheLiquibaseTableInfo); boolean hasDatabaseChangeLogTable(); boolean hasDatabaseChangeLogLockTable(); String getLiquibaseSchemaName(); void checkDatabaseChangeLogLockTable(); boolean isReservedWord(String string); void dropDatabaseObjects(String schema); boolean supportsDropTableCascadeConstraints(); boolean isSystemTable(String catalogName, String schemaName, String tableName); boolean isSystemView(String catalogName, String schemaName, String viewName); boolean isLiquibaseTable(String tableName); void tag(String tagString); boolean doesTagExist(String tag); @Override String toString(); boolean shouldQuoteValue(String value); String getViewDefinition(String schemaName, String viewName); String escapeTableName(String schemaName, String tableName); String escapeDatabaseObject(String objectName); String escapeIndexName(String schemaName, String indexName); String escapeSequenceName(String schemaName, String sequenceName); String escapeConstraintName(String constraintName); String escapeColumnName(String schemaName, String tableName, String columnName); String escapeColumnNameList(String columnNames); String convertRequestedSchemaToCatalog(String requestedSchema); String convertRequestedSchemaToSchema(String requestedSchema); boolean supportsSchemas(); String generatePrimaryKeyName(String tableName); String escapeViewName(String schemaName, String viewName); ChangeSet.RunStatus getRunStatus(ChangeSet changeSet); RanChangeSet getRanChangeSet(ChangeSet changeSet); List<RanChangeSet> getRanChangeSetList(); Date getRanDate(ChangeSet changeSet); void markChangeSetExecStatus(ChangeSet changeSet, ChangeSet.ExecType execType); void removeRanStatus(ChangeSet changeSet); String escapeStringForDatabase(String string); void commit(); void rollback(); @Override boolean equals(Object o); @Override int hashCode(); void close(); boolean supportsRestrictForeignKeys(); boolean isAutoCommit(); void setAutoCommit(boolean b); boolean isLocalDatabase(); void executeStatements(Change change, DatabaseChangeLog changeLog, List<SqlVisitor> sqlVisitors); void execute(SqlStatement[] statements, List<SqlVisitor> sqlVisitors); void saveStatements(Change change, List<SqlVisitor> sqlVisitors, Writer writer); void executeRollbackStatements(Change change, List<SqlVisitor> sqlVisitors); void saveRollbackStatement(Change change, List<SqlVisitor> sqlVisitors, Writer writer); int getNextChangeSetSequenceValue(); Table getTable(String schemaName, String tableName); List<DatabaseFunction> getDatabaseFunctions(); void reset(); boolean supportsForeignKeyDisable(); boolean disableForeignKeyChecks(); void enableForeignKeyChecks(); }
AbstractDatabase implements Database { public String escapeTableName(String schemaName, String tableName) { if (schemaName == null) { schemaName = getDefaultSchemaName(); } if (StringUtils.trimToNull(schemaName) == null || !supportsSchemas()) { return escapeDatabaseObject(tableName); } else { return escapeDatabaseObject(schemaName) + "." + escapeDatabaseObject(tableName); } } protected  AbstractDatabase(); boolean requiresPassword(); boolean requiresUsername(); DatabaseObject[] getContainingObjects(); DatabaseConnection getConnection(); void setConnection(DatabaseConnection conn); boolean getAutoCommitMode(); boolean supportsDDLInTransaction(); String getDatabaseProductName(); String getDatabaseProductVersion(); int getDatabaseMajorVersion(); int getDatabaseMinorVersion(); String getDefaultCatalogName(); String getDefaultSchemaName(); void setDefaultSchemaName(String schemaName); boolean supportsSequences(); boolean supportsAutoIncrement(); void setCurrentDateTimeFunction(String function); String getDateLiteral(String isoDate); String getDateTimeLiteral(java.sql.Timestamp date); String getDateLiteral(java.sql.Date date); String getTimeLiteral(java.sql.Time date); String getDateLiteral(Date date); Date parseDate(String dateAsString); String getLineComment(); String getAutoIncrementClause(BigInteger startWith, BigInteger incrementBy); String getConcatSql(String... values); String getDatabaseChangeLogTableName(); String getDatabaseChangeLogLockTableName(); void setDatabaseChangeLogTableName(String tableName); void setDatabaseChangeLogLockTableName(String tableName); void checkDatabaseChangeLogTable(boolean updateExistingNullChecksums, DatabaseChangeLog databaseChangeLog, String... contexts); void setCanCacheLiquibaseTableInfo(boolean canCacheLiquibaseTableInfo); boolean hasDatabaseChangeLogTable(); boolean hasDatabaseChangeLogLockTable(); String getLiquibaseSchemaName(); void checkDatabaseChangeLogLockTable(); boolean isReservedWord(String string); void dropDatabaseObjects(String schema); boolean supportsDropTableCascadeConstraints(); boolean isSystemTable(String catalogName, String schemaName, String tableName); boolean isSystemView(String catalogName, String schemaName, String viewName); boolean isLiquibaseTable(String tableName); void tag(String tagString); boolean doesTagExist(String tag); @Override String toString(); boolean shouldQuoteValue(String value); String getViewDefinition(String schemaName, String viewName); String escapeTableName(String schemaName, String tableName); String escapeDatabaseObject(String objectName); String escapeIndexName(String schemaName, String indexName); String escapeSequenceName(String schemaName, String sequenceName); String escapeConstraintName(String constraintName); String escapeColumnName(String schemaName, String tableName, String columnName); String escapeColumnNameList(String columnNames); String convertRequestedSchemaToCatalog(String requestedSchema); String convertRequestedSchemaToSchema(String requestedSchema); boolean supportsSchemas(); String generatePrimaryKeyName(String tableName); String escapeViewName(String schemaName, String viewName); ChangeSet.RunStatus getRunStatus(ChangeSet changeSet); RanChangeSet getRanChangeSet(ChangeSet changeSet); List<RanChangeSet> getRanChangeSetList(); Date getRanDate(ChangeSet changeSet); void markChangeSetExecStatus(ChangeSet changeSet, ChangeSet.ExecType execType); void removeRanStatus(ChangeSet changeSet); String escapeStringForDatabase(String string); void commit(); void rollback(); @Override boolean equals(Object o); @Override int hashCode(); void close(); boolean supportsRestrictForeignKeys(); boolean isAutoCommit(); void setAutoCommit(boolean b); boolean isLocalDatabase(); void executeStatements(Change change, DatabaseChangeLog changeLog, List<SqlVisitor> sqlVisitors); void execute(SqlStatement[] statements, List<SqlVisitor> sqlVisitors); void saveStatements(Change change, List<SqlVisitor> sqlVisitors, Writer writer); void executeRollbackStatements(Change change, List<SqlVisitor> sqlVisitors); void saveRollbackStatement(Change change, List<SqlVisitor> sqlVisitors, Writer writer); int getNextChangeSetSequenceValue(); Table getTable(String schemaName, String tableName); List<DatabaseFunction> getDatabaseFunctions(); void reset(); boolean supportsForeignKeyDisable(); boolean disableForeignKeyChecks(); void enableForeignKeyChecks();  }