Java Code Examples for org.hibernate.dialect.Dialect#supportsIfExistsBeforeTableName()

The following examples show how to use org.hibernate.dialect.Dialect#supportsIfExistsBeforeTableName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Table.java    From Knowage-Server with GNU Affero General Public License v3.0 5 votes vote down vote up
public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema) {
	StringBuffer buf = new StringBuffer( "drop table " );
	if ( dialect.supportsIfExistsBeforeTableName() ) {
		buf.append( "if exists " );
	}
	buf.append( getQualifiedName( dialect, defaultCatalog, defaultSchema ) )
			.append( dialect.getCascadeConstraintsString() );
	if ( dialect.supportsIfExistsAfterTableName() ) {
		buf.append( " if exists" );
	}
	return buf.toString();
}
 
Example 2
Source File: Table.java    From Knowage-Server with GNU Affero General Public License v3.0 5 votes vote down vote up
public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema) {
	StringBuffer buf = new StringBuffer( "drop table " );
	if ( dialect.supportsIfExistsBeforeTableName() ) {
		buf.append( "if exists " );
	}
	buf.append( getQualifiedName( dialect, defaultCatalog, defaultSchema ) )
			.append( dialect.getCascadeConstraintsString() );
	if ( dialect.supportsIfExistsAfterTableName() ) {
		buf.append( " if exists" );
	}
	return buf.toString();
}
 
Example 3
Source File: Table.java    From Knowage-Server with GNU Affero General Public License v3.0 5 votes vote down vote up
public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema) {
	StringBuffer buf = new StringBuffer( "drop table " );
	if ( dialect.supportsIfExistsBeforeTableName() ) {
		buf.append( "if exists " );
	}
	buf.append( getQualifiedName( dialect, defaultCatalog, defaultSchema ) )
			.append( dialect.getCascadeConstraintsString() );
	if ( dialect.supportsIfExistsAfterTableName() ) {
		buf.append( " if exists" );
	}
	return buf.toString();
}
 
Example 4
Source File: Table.java    From Knowage-Server with GNU Affero General Public License v3.0 5 votes vote down vote up
public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema) {
	StringBuffer buf = new StringBuffer( "drop table " );
	if ( dialect.supportsIfExistsBeforeTableName() ) {
		buf.append( "if exists " );
	}
	buf.append( getQualifiedName( dialect, defaultCatalog, defaultSchema ) )
			.append( dialect.getCascadeConstraintsString() );
	if ( dialect.supportsIfExistsAfterTableName() ) {
		buf.append( " if exists" );
	}
	return buf.toString();
}
 
Example 5
Source File: Table.java    From Knowage-Server with GNU Affero General Public License v3.0 5 votes vote down vote up
public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema) {
	StringBuffer buf = new StringBuffer( "drop table " );
	if ( dialect.supportsIfExistsBeforeTableName() ) {
		buf.append( "if exists " );
	}
	buf.append( getQualifiedName( dialect, defaultCatalog, defaultSchema ) )
			.append( dialect.getCascadeConstraintsString() );
	if ( dialect.supportsIfExistsAfterTableName() ) {
		buf.append( " if exists" );
	}
	return buf.toString();
}
 
Example 6
Source File: Table.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema) {
	StringBuffer buf = new StringBuffer( "drop table " );
	if ( dialect.supportsIfExistsBeforeTableName() ) {
		buf.append( "if exists " );
	}
	buf.append( getQualifiedName( dialect, defaultCatalog, defaultSchema ) )
			.append( dialect.getCascadeConstraintsString() );
	if ( dialect.supportsIfExistsAfterTableName() ) {
		buf.append( " if exists" );
	}
	return buf.toString();
}
 
Example 7
Source File: TableGenerator.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public String[] sqlDropStrings(Dialect dialect) throws HibernateException {
	StringBuffer sqlDropString = new StringBuffer().append( "drop table " );
	if ( dialect.supportsIfExistsBeforeTableName() ) {
		sqlDropString.append( "if exists " );
	}
	sqlDropString.append( tableName ).append( dialect.getCascadeConstraintsString() );
	if ( dialect.supportsIfExistsAfterTableName() ) {
		sqlDropString.append( " if exists" );
	}
	return new String[] { sqlDropString.toString() };
}
 
Example 8
Source File: TableStructure.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public String[] sqlDropStrings(Dialect dialect) throws HibernateException {
	StringBuffer sqlDropString = new StringBuffer().append( "drop table " );
	if ( dialect.supportsIfExistsBeforeTableName() ) {
		sqlDropString.append( "if exists " );
	}
	sqlDropString.append( tableName ).append( dialect.getCascadeConstraintsString() );
	if ( dialect.supportsIfExistsAfterTableName() ) {
		sqlDropString.append( " if exists" );
	}
	return new String[] { sqlDropString.toString() };
}
 
Example 9
Source File: TableGenerator.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public String[] sqlDropStrings(Dialect dialect) {
	StringBuffer sqlDropString = new StringBuffer( "drop table " );
	if ( dialect.supportsIfExistsBeforeTableName() ) {
		sqlDropString.append( "if exists " );
	}
	sqlDropString.append( tableName ).append( dialect.getCascadeConstraintsString() );
	if ( dialect.supportsIfExistsAfterTableName() ) {
		sqlDropString.append( " if exists" );
	}
	return new String[] { sqlDropString.toString() };
}
 
Example 10
Source File: MultipleHiLoPerTableGenerator.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public String[] sqlDropStrings(Dialect dialect) throws HibernateException {
	StringBuffer sqlDropString = new StringBuffer( "drop table " );
	if ( dialect.supportsIfExistsBeforeTableName() ) {
		sqlDropString.append( "if exists " );
	}
	sqlDropString.append( tableName ).append( dialect.getCascadeConstraintsString() );
	if ( dialect.supportsIfExistsAfterTableName() ) {
		sqlDropString.append( " if exists" );
	}
	return new String[] { sqlDropString.toString() };
}