Author: tomdz Date: Wed Sep 21 04:13:21 2005 New Revision: 290682 URL: http://svn.apache.org/viewcvs?rev=290682&view=rev Log: Added ability to specify at the ant tasks whether to use delimited sql identifiers or not
Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DatabaseCommand.java Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DatabaseCommand.java URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DatabaseCommand.java?rev=290682&r1=290681&r2=290682&view=diff ============================================================================== --- db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DatabaseCommand.java (original) +++ db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DatabaseCommand.java Wed Sep 21 04:13:21 2005 @@ -17,6 +17,8 @@ private BasicDataSource _dataSource; /** Whether to stop execution upon an error */ private boolean _failOnError = true; + /** Whether to use delimited SQL identifiers */ + private boolean _useDelimitedSqlIdentifiers = true; /** * Returns the database type. @@ -72,6 +74,26 @@ } /** + * Determines whether delimited SQL identifiers shall be used (the default). + * + * @return <code>true</code> if delimited SQL identifiers shall be used + */ + public boolean isUseDelimitedSqlIdentifiers() + { + return _useDelimitedSqlIdentifiers; + } + + /** + * Specifies whether delimited SQL identifiers shall be used. + * + * @param useDelimitedSqlIdentifiers <code>true</code> if delimited SQL identifiers shall be used + */ + public void setUseDelimitedSqlIdentifiers(boolean useDelimitedSqlIdentifiers) + { + _useDelimitedSqlIdentifiers = useDelimitedSqlIdentifiers; + } + + /** * Creates the platform for the configured database. * * @return The platform @@ -108,10 +130,9 @@ { throw new BuildException("Database type "+_databaseType+" is not supported."); } - else - { - platform.setDataSource(_dataSource); - return platform; - } + platform.setDataSource(_dataSource); + platform.getPlatformInfo().setUseDelimitedIdentifiers(isUseDelimitedSqlIdentifiers()); + + return platform; } }