📄 hxttdialect.java
字号:
}
// current timestamp support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* Does this dialect support a way to retrieve the database's current
* timestamp value?
*
* @return True if the current timestamp can be retrieved; false otherwise.
*/
public final boolean supportsCurrentTimestampSelection() {
return true;//false;
}
/**
* Should the value returned by {@link #getCurrentTimestampSelectString}
* be treated as callable. Typically this indicates that JDBC escape
* sytnax is being used...
*
* @return True if the {@link #getCurrentTimestampSelectString} return
* is callable; false otherwise.
*/
public final boolean isCurrentTimestampSelectStringCallable() {
return true;//???
}
/**
* Retrieve the command used to retrieve the current timestammp from the
* database.
*
* @return The command.
*/
public final String getCurrentTimestampSelectString() {
return "select now()";
//"select systimestamp from dual"
//"select now()";
//"call current_timestamp()"
}
/**
* The name of the database-specific SQL function for retrieving the
* current timestamp.
*
* @return The function name.
*/
public final String getCurrentTimestampSQLFunctionName() {
// the standard SQL function name is current_timestamp...
return "now";//current_timestamp";
}
// union subclass support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* Does this dialect support UNION ALL, which is generally a faster
* variant of UNION?
*
* @return True if UNION ALL is supported; false otherwise.
*/
public final boolean supportsUnionAll() {
return true;//false;
}
// miscellaneous support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* The fragment used to insert a row without specifying any column values.
* This is not possible on some databases.
*
* @return The appropriate empty values clause.
*/
public final String getNoColumnsInsertString() {
return "values ( )";//???Doesn't support now.'
//return "default values";
}
/**
* The SQL literal value to which this database maps boolean values.
*
* @param bool The boolean value
* @return The appropriate SQL literal.
*/
public final String toBooleanValueString(boolean bool) {
return bool ? "true" : "false";
}
// DDL support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* Do we need to drop constraints before dropping tables in this dialect?
*
* @return True if constraints must be dropped prior to dropping
* the table; false otherwise.
*/
public final boolean dropConstraints() {
return false;//true;
}
/**
* Do we need to qualify index names with the schema name?
*
* @return boolean
*/
public final boolean qualifyIndexName() {
return false;//true;
}
/**
* The syntax used to add a column to a table (optional).
*
* @return The "add column" fragment.
*/
public final String getAddColumnString() {
//ALTER table TBNAME ADD COLUMN FIELDNAME FIELDTYPE
return "add column";
}
public final String getDropForeignKeyString() {
throw new UnsupportedOperationException("No drop foreign key foreign supported by Hxtt Dialect");
//return " drop constraint ";
}
/**
* The syntax used to add a primary key constraint to a table.
*
* @param constraintName The name of the PK constraint.
* @return The "add PK" fragment
*/
public final String getAddPrimaryKeyConstraintString(String constraintName) {
return " primary key ";
//return " add constraint " + constraintName + " primary key ";
}
/**
* The keyword used to specify a nullable column.
*
* @return String
*/
public final String getNullColumnString() {
return " null";
}
public final boolean supportsIfExistsBeforeTableName() {
return true;//false;
}
/**
* Does this dialect support column-level check constraints?
*
* @return True if column-level CHECK constraints are supported; false
* otherwise.
*/
public final boolean supportsColumnCheck() {
return false;//true;//Support little
}
/**
* Does this dialect support table-level check constraints?
*
* @return True if table-level CHECK constraints are supported; false
* otherwise.
*/
public final boolean supportsTableCheck() {
return false;//true;
}
public boolean supportsCascadeDelete() {
return false;//true; HXTT Access supports
}
/**
* Is this dialect known to support what ANSI-SQL terms "row value
* constructor" syntax; sometimes called tuple syntax.
* <p/>
* Basically, does it support syntax like
* "... where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...".
*
* @return True if this SQL dialect is known to support "row value
* constructor" syntax; false otherwise.
* @since 3.2
*/
public final boolean supportsRowValueConstructorSyntax() {
// return false here, as most databases do not properly support this construct...
return true;//false;
}
/**
* If the dialect supports {@link #supportsRowValueConstructorSyntax() row values},
* does it offer such support in IN lists as well?
* <p/>
* For example, "... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ..."
*
* @return True if this SQL dialect is known to support "row value
* constructor" syntax in the IN list; false otherwise.
* @since 3.2
*/
public final boolean supportsRowValueConstructorSyntaxInInList() {
return true;//false;
}
/**
* Should LOBs (both BLOB and CLOB) be bound using stream operations (i.e.
* {@link java.sql.PreparedStatement#setBinaryStream}).
*
* @return True if BLOBs and CLOBs should be bound using stream operations.
* @since 3.2
*/
public final boolean useInputStreamToInsertBlob() {
return false;//true;//???
}
/**
* Does this dialect support definition of cascade delete constraints
* which can cause circular chains?
*
* @return True if circular cascade delete constraints are supported; false
* otherwise.
* @since 3.2
*/
public final boolean supportsCircularCascadeDeleteConstraints() {
return false;//true; //??? MS Access doesn't support too?
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -