本文整理汇总了Java中org.hsqldb.types.Type.isLobType方法的典型用法代码示例。如果您正苦于以下问题:Java Type.isLobType方法的具体用法?Java Type.isLobType怎么用?Java Type.isLobType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.types.Type
的用法示例。
在下文中一共展示了Type.isLobType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Constraint
import org.hsqldb.types.Type; //导入方法依赖的package包/类
/**
* Constructor declaration for PK and UNIQUE
*/
public Constraint(HsqlName name, Table t, Index index, int type) {
this.name = name;
constType = type;
core = new ConstraintCore();
core.mainTable = t;
core.mainIndex = index;
core.mainCols = index.getColumns();
for (int i = 0; i < core.mainCols.length; i++) {
Type dataType = t.getColumn(core.mainCols[i]).getDataType();
if (dataType.isLobType()) {
throw Error.error(ErrorCode.X_42534);
}
}
}
示例2: checkRowComparison
import org.hsqldb.types.Type; //导入方法依赖的package包/类
void checkRowComparison() {
if (opType == OpTypes.EQUAL || opType == OpTypes.NOT_EQUAL) {
return;
}
for (int i = 0; i < nodes[LEFT].nodeDataTypes.length; i++) {
Type leftType = nodes[LEFT].nodeDataTypes[i];
Type rightType = nodes[RIGHT].nodeDataTypes[i];
if (leftType.isArrayType() || leftType.isLobType()
|| rightType.isLobType()) {
throw Error.error(ErrorCode.X_42534);
}
}
}
示例3: createArrayOf
import org.hsqldb.types.Type; //导入方法依赖的package包/类
/**
* Factory method for creating Array objects.
* <p>
* <b>Note: </b>When <code>createArrayOf</code> is used to create an array object
* that maps to a primitive data type, then it is implementation-defined
* whether the <code>Array</code> object is an array of that primitive
* data type or an array of <code>Object</code>.
* <p>
* <b>Note: </b>The JDBC driver is responsible for mapping the elements
* <code>Object</code> array to the default JDBC SQL type defined in
* java.sql.Types for the given class of <code>Object</code>. The default
* mapping is specified in Appendix B of the JDBC specification. If the
* resulting JDBC type is not the appropriate type for the given typeName then
* it is implementation defined whether an <code>SQLException</code> is
* thrown or the driver supports the resulting conversion.
*
* @param typeName the SQL name of the type the elements of the array map to. The typeName is a
* database-specific name which may be the name of a built-in type, a user-defined type or a standard SQL type supported by this database. This
* is the value returned by <code>Array.getBaseTypeName</code>
* @param elements the elements that populate the returned object
* @return an Array object whose elements map to the specified SQL type
* @throws SQLException if a database error occurs, the JDBC type is not
* appropriate for the typeName and the conversion is not supported, the typeName is null or this method is called on a closed connection
* @throws SQLFeatureNotSupportedException if the JDBC driver does not support this data type
* @since 1.6
*/
//#ifdef JAVA6
public Array createArrayOf(String typeName,
Object[] elements) throws SQLException {
checkClosed();
if (typeName == null) {
throw JDBCUtil.nullArgument();
}
typeName = typeName.toUpperCase();
int typeCode = Type.getTypeNr(typeName);
if (typeCode < 0) {
throw JDBCUtil.invalidArgument(typeName);
}
Type type = Type.getDefaultType(typeCode);
if (type.isArrayType() || type.isLobType() || type.isRowType()) {
throw JDBCUtil.invalidArgument(typeName);
}
Object[] newData = new Object[elements.length];
try {
for (int i = 0; i < elements.length; i++) {
Object o = type.convertJavaToSQL(sessionProxy, elements[i]);
newData[i] = type.convertToTypeLimits(sessionProxy, o);
}
} catch (HsqlException e) {
throw JDBCUtil.sqlException(e);
}
return new JDBCArray(newData, type, this);
}
示例4: setColumnTypeVars
import org.hsqldb.types.Type; //导入方法依赖的package包/类
void setColumnTypeVars(int i) {
ColumnSchema column = getColumn(i);
Type dataType = column.getDataType();
if (dataType.isDomainType()) {
hasDomainColumns = true;
}
if (dataType.isLobType()) {
hasLobColumn = true;
}
colTypes[i] = dataType;
colNotNull[i] = column.isPrimaryKey() || !column.isNullable();
defaultColumnMap[i] = i;
if (column.isIdentity()) {
identitySequence = column.getIdentitySequence();
identityColumn = i;
} else if (identityColumn == i) {
identityColumn = -1;
}
colDefaults[i] = column.getDefaultExpression();
colGenerated[i] = column.isGenerated();
resetDefaultsFlag();
}