本文整理汇总了Java中org.hsqldb.lib.ArrayUtil.fillSequence方法的典型用法代码示例。如果您正苦于以下问题:Java ArrayUtil.fillSequence方法的具体用法?Java ArrayUtil.fillSequence怎么用?Java ArrayUtil.fillSequence使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.lib.ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil.fillSequence方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setTableIndexesForSubquery
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
private void setTableIndexesForSubquery(Session session) {
int[] cols = null;
if (uniqueRows || uniquePredicate) {
cols = new int[getColumnCount()];
ArrayUtil.fillSequence(cols);
}
int[] pkcols = uniqueRows ? cols
: null;
createPrimaryKey(null, pkcols, false);
if (uniqueRows) {
fullIndex = getPrimaryIndex();
} else if (uniquePredicate) {
fullIndex = createIndexForColumns(session, cols);
}
}
示例2: prepare
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public void prepare(int degree) {
columnCount = exprList.size();
if (columnCount == 0) {
return;
}
sortOrder = new int[columnCount + degree];
sortDescending = new boolean[columnCount + degree];
sortNullsLast = new boolean[columnCount + degree];
ArrayUtil.fillSequence(sortOrder);
for (int i = 0; i < columnCount; i++) {
ExpressionOrderBy sort = (ExpressionOrderBy) exprList.get(i);
sortDescending[i] = sort.isDescending();
sortNullsLast[i] = sort.isNullsLast();
hasNullsLast |= sortNullsLast[i];
}
}
示例3: setTableIndexesForSubquery
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
static void setTableIndexesForSubquery(Table table, boolean fullIndex,
boolean uniqueRows) {
int[] cols = null;
if (fullIndex) {
cols = new int[table.getColumnCount()];
ArrayUtil.fillSequence(cols);
}
table.createPrimaryKey(null, uniqueRows ? cols
: null, false);
if (uniqueRows) {
table.fullIndex = table.getPrimaryIndex();
} else if (fullIndex) {
table.fullIndex = table.createIndexForColumns(null, cols);
}
}
示例4: TableDerived
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public TableDerived(Database database, HsqlName name, int type,
Type[] columnTypes, HashMappedList columnList,
QueryExpression queryExpression) {
this(database, name, type, queryExpression);
this.colTypes = columnTypes;
this.columnList = columnList;
columnCount = columnList.size();
primaryKeyCols = ValuePool.emptyIntArray;
primaryKeyTypes = Type.emptyArray;
primaryKeyColsSequence = ValuePool.emptyIntArray;
colDefaults = new Expression[columnCount];
colNotNull = new boolean[columnCount];
defaultColumnMap = new int[columnCount];
ArrayUtil.fillSequence(defaultColumnMap);
bestIndexForColumn = new int[colTypes.length];
ArrayUtil.fillArray(bestIndexForColumn, -1);
createPrimaryIndex(primaryKeyCols, primaryKeyTypes, null);
}
示例5: setTableIndexesForSubquery
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
private void setTableIndexesForSubquery() {
int[] cols = null;
if (uniqueRows || uniquePredicate) {
cols = new int[getColumnCount()];
ArrayUtil.fillSequence(cols);
}
int pkcols[] = uniqueRows ? cols
: null;
if (primaryKeyCols == null) {
createPrimaryKey(null, pkcols, false);
}
if (uniqueRows) {
fullIndex = getPrimaryIndex();
} else if (uniquePredicate) {
fullIndex = createIndexForColumns(null, cols);
}
}
示例6: createTable
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
void createTable(Session session) {
createResultTable(session);
mainIndex = resultTable.getPrimaryIndex();
if (sortAndSlice.hasOrder()) {
orderIndex = resultTable.createAndAddIndexStructure(null,
sortAndSlice.sortOrder, sortAndSlice.sortDescending,
sortAndSlice.sortNullsLast, false, false, false);
}
int[] fullCols = new int[columnCount];
ArrayUtil.fillSequence(fullCols);
fullIndex = resultTable.createAndAddIndexStructure(null, fullCols,
null, null, false, false, false);
resultTable.fullIndex = fullIndex;
}
示例7: IndexAVL
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Constructor declaration
*
* @param name HsqlName of the index
* @param id persistnece id
* @param table table of the index
* @param columns array of column indexes
* @param descending boolean[]
* @param nullsLast boolean[]
* @param colTypes array of column types
* @param unique is this a unique index
* @param constraint does this index belonging to a constraint
* @param forward is this an auto-index for an FK that refers to a table
* defined after this table
*/
public IndexAVL(HsqlName name, long id, TableBase table, int[] columns,
boolean[] descending, boolean[] nullsLast,
Type[] colTypes, boolean pk, boolean unique,
boolean constraint, boolean forward) {
persistenceId = id;
this.name = name;
this.colIndex = columns;
this.colTypes = colTypes;
this.colDesc = descending == null ? new boolean[columns.length]
: descending;
this.nullsLast = nullsLast == null ? new boolean[columns.length]
: nullsLast;
isUnique = unique;
isConstraint = constraint;
isForward = forward;
this.table = table;
this.pkCols = table.getPrimaryKey();
this.pkTypes = table.getPrimaryKeyTypes();
useRowId = (!isUnique && pkCols.length == 0) || (colIndex.length == 0);
colCheck = table.getNewColumnCheckList();
ArrayUtil.intIndexesToBooleanArray(colIndex, colCheck);
defaultColMap = new int[columns.length];
ArrayUtil.fillSequence(defaultColMap);
}
示例8: createPrimaryKey
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Creates a single or multi-column primary key and index. sets the
* colTypes array. Finalises the creation of the table. ([email protected])
*/
public void createPrimaryKey(HsqlName indexName, int[] columns,
boolean columnsNotNull) {
if (primaryKeyCols != null) {
throw Error.runtimeError(ErrorCode.U_S0500, "Table");
}
if (columns == null) {
columns = ValuePool.emptyIntArray;
}
for (int i = 0; i < columns.length; i++) {
getColumn(columns[i]).setPrimaryKey(true);
}
primaryKeyCols = columns;
setColumnStructures();
primaryKeyTypes = new Type[primaryKeyCols.length];
ArrayUtil.projectRow(colTypes, primaryKeyCols, primaryKeyTypes);
primaryKeyColsSequence = new int[primaryKeyCols.length];
ArrayUtil.fillSequence(primaryKeyColsSequence);
HsqlName name = indexName;
if (name == null) {
name = database.nameManager.newAutoName("IDX", getSchemaName(),
getName(), SchemaObject.INDEX);
}
createPrimaryIndex(primaryKeyCols, primaryKeyTypes, name);
setBestRowIdentifiers();
}
示例9: createPrimaryKey
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Creates a single or multi-column primary key and index. sets the colTypes
* array. Finalises the creation of the table. ([email protected])
*/
public void createPrimaryKey(HsqlName indexName, int[] columns, boolean columnsNotNull) {
if (primaryKeyCols != null) {
throw Error.runtimeError(ErrorCode.U_S0500, "Table");
}
if (columns == null) {
columns = ValuePool.emptyIntArray;
} else {
for (int i = 0; i < columns.length; i++) {
getColumn(columns[i]).setPrimaryKey(true);
}
}
primaryKeyCols = columns;
setColumnStructures();
primaryKeyTypes = new Type[primaryKeyCols.length];
ArrayUtil.projectRow(colTypes, primaryKeyCols, primaryKeyTypes);
primaryKeyColsSequence = new int[primaryKeyCols.length];
ArrayUtil.fillSequence(primaryKeyColsSequence);
HsqlName name = indexName;
if (name == null) {
name = database.nameManager.newAutoName("IDX", getSchemaName(), getName(), SchemaObject.INDEX);
}
createPrimaryIndex(primaryKeyCols, primaryKeyTypes, name);
setBestRowIdentifiers();
}
示例10: resolveReferences
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
public void resolveReferences(Session session) {
finaliseRangeVariables();
resolveColumnReferencesForAsterisk();
finaliseColumns();
resolveColumnReferences();
unionColumnTypes = new Type[indexLimitVisible];
unionColumnMap = new int[indexLimitVisible];
ArrayUtil.fillSequence(unionColumnMap);
}
示例11: createTable
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
void createTable(Session session) {
createResultTable(session);
mainIndex = resultTable.getPrimaryIndex();
if (sortAndSlice.hasOrder()) {
orderIndex = sortAndSlice.getNewIndex(session, resultTable);
}
int[] fullCols = new int[columnCount];
ArrayUtil.fillSequence(fullCols);
fullIndex = resultTable.createAndAddIndexStructure(session, null,
fullCols, null, null, false, false, false);
resultTable.fullIndex = fullIndex;
}
示例12: setTableColumnsForSubquery
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* For table subqueries
*/
static void setTableColumnsForSubquery(Table table, QueryExpression queryExpression, boolean fullIndex) {
table.columnList = queryExpression.getColumns();
table.columnCount = queryExpression.getColumnCount();
table.createPrimaryKey();
if (fullIndex) {
int[] colIndexes = null;
colIndexes = table.getNewColumnMap();
ArrayUtil.fillSequence(colIndexes);
table.fullIndex = table.createIndexForColumns(colIndexes);
}
}
示例13: createPrimaryKey
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
/**
* Creates a single or multi-column primary key and index. sets the
* colTypes array. Finalises the creation of the table. ([email protected])
*/
// [email protected] 20020820 - patch 595099
void createPrimaryKey(HsqlName indexName, int[] columns,
boolean columnsNotNull) throws HsqlException {
if (primaryKeyCols != null) {
Trace.doAssert(false, "Table.createPrimaryKey(column)");
}
if (columns == null) {
columns = new int[0];
} else {
for (int i = 0; i < columns.length; i++) {
if (columnsNotNull) {
getColumn(columns[i]).setNullable(false);
}
getColumn(columns[i]).setPrimaryKey(true);
}
}
primaryKeyCols = columns;
colTypes = new int[columnCount];
colDefaults = new Expression[columnCount];
colSizes = new int[columnCount];
colScales = new int[columnCount];
colNullable = new boolean[columnCount];
defaultColumnMap = new int[columnCount];
for (int i = 0; i < columnCount; i++) {
setColumnTypeVars(i);
}
primaryKeyTypes = new int[primaryKeyCols.length];
ArrayUtil.copyColumnValues(colTypes, primaryKeyCols, primaryKeyTypes);
primaryKeyColsSequence = new int[primaryKeyCols.length];
ArrayUtil.fillSequence(primaryKeyColsSequence);
resetDefaultsFlag();
// [email protected] 20020820 - patch 595099
HsqlName name = indexName != null ? indexName
: database.nameManager.newAutoName(
"IDX");
createPrimaryIndex(columns, name);
setBestRowIdentifiers();
}
示例14: createFullIndex
import org.hsqldb.lib.ArrayUtil; //导入方法依赖的package包/类
private void createFullIndex(Session session) {
int[] fullCols = new int[indexLimitVisible];
ArrayUtil.fillSequence(fullCols);
fullIndex = resultTable.createAndAddIndexStructure(session, null,
fullCols, null, null, false, false, false);
resultTable.fullIndex = fullIndex;
}