本文整理汇总了Java中org.hsqldb.lib.HsqlArrayList类的典型用法代码示例。如果您正苦于以下问题:Java HsqlArrayList类的具体用法?Java HsqlArrayList怎么用?Java HsqlArrayList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HsqlArrayList类属于org.hsqldb.lib包,在下文中一共展示了HsqlArrayList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addConditionsToList
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
private static void addConditionsToList(HsqlArrayList list,
Expression[] array) {
if (array == null) {
return;
}
for (int i = 0; i < array.length; i++) {
if (array[i] != null) {
if (array[i].isSingleColumnCondition
|| array[i].isSingleColumnNull
|| array[i].isSingleColumnNotNull) {
list.add(array[i]);
}
}
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:RangeVariable.java
示例2: getTransactionIDList
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
/**
* Return a lookup of all transactions ids for cached tables.
*/
public DoubleIntIndex getTransactionIDList() {
Session[] sessions = database.sessionManager.getAllSessions();
DoubleIntIndex lookup = new DoubleIntIndex(10, false);
lookup.setKeysSearchTarget();
for (int i = 0; i < sessions.length; i++) {
HsqlArrayList tlist = sessions[i].rowActionList;
for (int j = 0, size = tlist.size(); j < size; j++) {
Transaction tx = (Transaction) tlist.get(j);
if (tx.tTable.getTableType() == Table.CACHED_TABLE) {
lookup.addUnique(tx.row.getPos(), 0);
}
}
}
return lookup;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:25,代码来源:TransactionManager.java
示例3: collectInGroupByExpressions
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
/**
* Collects all expressions that must be in the GROUP BY clause, for a
* grouped select statement.
*
* @param colExps expression list
*/
void collectInGroupByExpressions(HsqlArrayList colExps) {
if (!(isConstant() || isSelfAggregate())) {
if (isColumn()) {
colExps.add(this);
} else if (exprType == FUNCTION) {
// function.collectInGroupByExpressions(colExps);
} else if (exprType == CASEWHEN) {
eArg2.collectInGroupByExpressions(colExps);
} else {
if (eArg != null) {
eArg.collectInGroupByExpressions(colExps);
}
if (eArg2 != null) {
eArg2.collectInGroupByExpressions(colExps);
}
}
}
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:28,代码来源:Expression.java
示例4: dropRole
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
private static void dropRole(Session session, HsqlName name,
boolean cascade) {
Grantee role = session.database.getGranteeManager().getRole(name.name);
if (!cascade && session.database.schemaManager.hasSchemas(role)) {
HsqlArrayList list =
session.database.schemaManager.getSchemas(role);
Schema schema = (Schema) list.get(0);
throw Error.error(ErrorCode.X_42502,
schema.getName().statementName);
}
session.database.schemaManager.dropSchemas(session, role, cascade);
session.database.getGranteeManager().dropRole(name.name);
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:18,代码来源:StatementSchema.java
示例5: compareLists
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
/**
* Compare contents of lists to the vector. Print out stuff if they are
* inconsistent and exit.
*/
public void compareLists(HsqlArrayList arrayList,
HsqlLinkedList linkedList, Vector vector) {
boolean arrayListError = false;
boolean linkedListError = false;
if (!equalsVector(arrayList, vector)) {
System.out.println("Error in array list implementation");
arrayListError = true;
}
if (!equalsVector(linkedList, vector)) {
System.out.println("Error in linked list implementation");
linkedListError = true;
}
if (arrayListError || linkedListError) {
this.printListCommandsCalled(listCommandsCalled);
System.out.flush();
fail("test failed");
System.exit(0);
}
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:30,代码来源:TestDataStructures.java
示例6: setIndexRoots
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
/**
* called after the completion of defrag
*/
public void setIndexRoots(long[][] roots) {
readLock.lock();
try {
HsqlArrayList allTables =
database.schemaManager.getAllTables(true);
for (int i = 0, size = allTables.size(); i < size; i++) {
Table t = (Table) allTables.get(i);
if (t.getTableType() == TableBase.CACHED_TABLE) {
long[] rootsArray = roots[i];
if (rootsArray != null) {
t.setIndexRoots(rootsArray);
}
}
}
} finally {
readLock.unlock();
}
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:27,代码来源:SchemaManager.java
示例7: convertTransactionIDs
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
/**
* Convert row ID's for cached table rows in transactions
*/
public void convertTransactionIDs(DoubleIntIndex lookup) {
Session[] sessions = database.sessionManager.getAllSessions();
for (int i = 0; i < sessions.length; i++) {
HsqlArrayList tlist = sessions[i].rowActionList;
for (int j = 0, size = tlist.size(); j < size; j++) {
Transaction tx = (Transaction) tlist.get(j);
if (tx.tTable.getTableType() == Table.CACHED_TABLE) {
int pos = lookup.lookupFirstEqual(tx.row.getPos());
tx.row.setPos(pos);
}
}
}
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:22,代码来源:TransactionManager.java
示例8: checkAggregateOrGroupByOrderColumns
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
private void checkAggregateOrGroupByOrderColumns(int start,
int end) throws HsqlException {
checkAggregateOrGroupByColumns(start, end);
if (start < end && isDistinctSelect) {
HsqlArrayList colExps = new HsqlArrayList();
for (int i = start; i < end; i++) {
exprColumns[i].collectInGroupByExpressions(colExps);
}
for (int i = 0, size = colExps.size(); i < size; i++) {
Expression exp = (Expression) colExps.get(i);
if (isSimilarIn(exp, 0, iResultLen)) {
continue;
}
throw Trace.error(Trace.INVALID_ORDER_BY_IN_DISTINCT_SELECT,
exp);
}
}
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:25,代码来源:Select.java
示例9: getRightsArraySub
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
private static String[] getRightsArraySub(int right) {
// checkValidFlags(right);
if (right == 0) {
return emptyRightsList;
}
HsqlArrayList a = new HsqlArrayList();
Iterator it = rightsStringLookup.keySet().iterator();
for (; it.hasNext(); ) {
String rightString = (String) it.next();
if (rightString.equals(S_R_ALL)) {
continue;
}
int i = rightsStringLookup.get(rightString, 0);
if ((right & i) != 0) {
a.add(rightString);
}
}
return (String[]) a.toArray(new String[a.size()]);
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:27,代码来源:UserManager.java
示例10: Session
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
/**
* Constructs a new Session object.
*
* @param db the database to which this represents a connection
* @param user the initial user
* @param autocommit the initial autocommit value
* @param readonly the initial readonly value
* @param id the session identifier, as known to the database
*/
Session(Database db, User user, boolean autocommit, boolean readonly,
int id) {
sessionId = id;
database = db;
this.user = user;
rowActionList = new HsqlArrayList(true);
savepoints = new HashMappedList(4);
isAutoCommit = autocommit;
isReadOnly = readonly;
dbCommandInterpreter = new DatabaseCommandInterpreter(this);
compiledStatementExecutor = new CompiledStatementExecutor(this);
compiledStatementManager = db.compiledStatementManager;
tokenizer = new Tokenizer();
parser = new Parser(this, database, tokenizer);
resetSchema();
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:28,代码来源:Session.java
示例11: addTableColumns
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
/**
* Add all columns to a list of expressions
*/
int addTableColumns(HsqlArrayList expList, int position, HashSet exclude) {
Table table = getTable();
int count = table.getColumnCount();
for (int i = 0; i < count; i++) {
ColumnSchema column = table.getColumn(i);
String columnName = columnAliases == null ? column.getName().name
: (String) columnAliases
.get(i);
if (exclude != null && exclude.contains(columnName)) {
continue;
}
Expression e = new ExpressionColumn(this, column, i);
expList.add(position++, e);
}
return position;
}
开发者ID:s-store,项目名称:s-store,代码行数:26,代码来源:RangeVariable.java
示例12: getSQLArray
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
public HsqlArrayList getSQLArray(OrderedHashSet resolved,
OrderedHashSet unresolved) {
HsqlArrayList list = new HsqlArrayList();
String setSchema = getSetSchemaSQL(name);
list.add(setSchema);
sequenceLookup.getSQL(list, resolved, unresolved);
tableLookup.getSQL(list, resolved, unresolved);
functionLookup.getSQL(list, resolved, unresolved);
procedureLookup.getSQL(list, resolved, unresolved);
referenceLookup.getSQL(list, resolved, unresolved);
if (list.size() == 1) {
list.clear();
}
return list;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:20,代码来源:Schema.java
示例13: compileTriggerSetStatement
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
/**
* Creates SET Statement for a trigger row from this parse context.
*/
StatementDMQL compileTriggerSetStatement(Table table, RangeVariable[] rangeVars) {
read();
Expression[] updateExpressions;
int[] columnMap;
OrderedHashSet colNames = new OrderedHashSet();
HsqlArrayList exprList = new HsqlArrayList();
RangeVariable[] targetRangeVars = new RangeVariable[] { rangeVars[TriggerDef.NEW_ROW] };
readSetClauseList(targetRangeVars, colNames, exprList);
columnMap = table.getColumnIndexes(colNames);
updateExpressions = new Expression[exprList.size()];
exprList.toArray(updateExpressions);
resolveUpdateExpressions(table, rangeVars, columnMap, updateExpressions, RangeVariable.emptyArray);
StatementDMQL cs = new StatementDML(session, table, rangeVars, columnMap, updateExpressions, compileContext);
return cs;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:26,代码来源:ParserDDL.java
示例14: Session
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
/**
* Constructs a new Session object.
*
* @param db the database to which this represents a connection
* @param user the initial user
* @param autocommit the initial autocommit value
* @param readonly the initial readonly value
* @param id the session identifier, as known to the database
*/
Session(Database db, User user, boolean autocommit, boolean readonly,
long id, String zoneString, int timeZoneSeconds) {
sessionId = id;
database = db;
this.user = user;
this.sessionUser = user;
this.zoneString = zoneString;
this.sessionTimeZoneSeconds = timeZoneSeconds;
this.timeZoneSeconds = timeZoneSeconds;
rowActionList = new HsqlArrayList(32, true);
waitedSessions = new OrderedHashSet();
waitingSessions = new OrderedHashSet();
tempSet = new OrderedHashSet();
isolationLevelDefault = database.defaultIsolationLevel;
ignoreCase = database.sqlIgnoreCase;
isolationLevel = isolationLevelDefault;
txConflictRollback = database.txConflictRollback;
isReadOnlyDefault = readonly;
isReadOnlyIsolation = isolationLevel
== SessionInterface.TX_READ_UNCOMMITTED;
sessionContext = new SessionContext(this);
sessionContext.isAutoCommit = autocommit ? Boolean.TRUE
: Boolean.FALSE;
sessionContext.isReadOnly = isReadOnlyDefault ? Boolean.TRUE
: Boolean.FALSE;
parser = new ParserCommand(this, new Scanner(database));
setResultMemoryRowCount(database.getResultMaxMemoryRows());
resetSchema();
sessionData = new SessionData(database, this);
statementManager = new StatementManager(database);
timeoutManager = new TimeoutManager();
sessionStartTimestamp = System.currentTimeMillis();
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:46,代码来源:Session.java
示例15: ExpressionArrayAggregate
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
ExpressionArrayAggregate(int type, boolean distinct, Expression e,
SortAndSlice sort, String separator) {
super(type);
this.isDistinctAggregate = distinct;
this.sort = sort;
if (separator != null) {
this.separator = separator;
}
if (type == OpTypes.MEDIAN) {
nodes = new Expression[]{ e };
return;
}
if (sort == null) {
nodes = new Expression[]{ e };
} else {
HsqlArrayList list = sort.getExpressionList();
nodes = new Expression[list.size() + 1];
list.toArray(nodes);
nodes[list.size()] = e;
sort.prepare(1);
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:33,代码来源:ExpressionArrayAggregate.java
示例16: getRightsSQL
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
public String[] getRightsSQL() {
HsqlArrayList list = new HsqlArrayList();
Iterator grantees = getGrantees().iterator();
while (grantees.hasNext()) {
Grantee grantee = (Grantee) grantees.next();
String name = grantee.getName().getNameString();
// _SYSTEM user, DBA Role grants not persisted
if (GranteeManager.isImmutable(name)) {
continue;
}
if (grantee instanceof User && ((User) grantee).isExternalOnly) {
continue;
}
HsqlArrayList subList = grantee.getRightsSQL();
list.addAll(subList);
}
String[] array = new String[list.size()];
list.toArray(array);
return array;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:30,代码来源:GranteeManager.java
示例17: addTableColumns
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
/**
* Add all columns to a list of expressions
*/
public void addTableColumns(HsqlArrayList exprList) {
if (namedJoinColumns != null) {
int count = exprList.size();
int position = 0;
for (int i = 0; i < count; i++) {
Expression e = (Expression) exprList.get(i);
String columnName = e.getColumnName();
if (namedJoinColumns.contains(columnName)) {
if (position != i) {
exprList.remove(i);
exprList.add(position, e);
}
e = getColumnExpression(columnName);
exprList.set(position, e);
position++;
}
}
}
addTableColumns(exprList, exprList.size(), namedJoinColumns);
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:31,代码来源:RangeVariable.java
示例18: updateTableIndexRoots
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
/**
* called from outside after the complete end of defrag
*/
void updateTableIndexRoots() {
HsqlArrayList allTables = database.schemaManager.getAllTables();
for (int i = 0, size = allTables.size(); i < size; i++) {
Table t = (Table) allTables.get(i);
if (t.getTableType() == TableBase.CACHED_TABLE) {
int[] rootsArray = rootsList[i];
t.setIndexRoots(rootsArray);
}
}
}
开发者ID:s-store,项目名称:s-store,代码行数:18,代码来源:DataFileDefrag.java
示例19: RangeVariableResolver
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
RangeVariableResolver(RangeVariable[] rangeVars, Expression conditions,
CompileContext compileContext) {
this.rangeVariables = rangeVars;
this.conditions = conditions;
this.compileContext = compileContext;
for (int i = 0; i < rangeVars.length; i++) {
RangeVariable range = rangeVars[i];
rangeVarSet.add(range);
if (range.isLeftJoin || range.isRightJoin) {
hasOuterJoin = true;
}
}
inExpressions = new Expression[rangeVars.length];
flags = new boolean[rangeVars.length];
tempJoinExpressions = new HsqlArrayList[rangeVars.length];
for (int i = 0; i < rangeVars.length; i++) {
tempJoinExpressions[i] = new HsqlArrayList();
}
joinExpressions = new HsqlArrayList[rangeVars.length];
for (int i = 0; i < rangeVars.length; i++) {
joinExpressions[i] = new HsqlArrayList();
}
whereExpressions = new HsqlArrayList[rangeVars.length];
for (int i = 0; i < rangeVars.length; i++) {
whereExpressions[i] = new HsqlArrayList();
}
}
开发者ID:s-store,项目名称:s-store,代码行数:38,代码来源:RangeVariableResolver.java
示例20: QuerySpecification
import org.hsqldb.lib.HsqlArrayList; //导入依赖的package包/类
QuerySpecification(CompileContext compileContext) {
super(compileContext);
this.compileContext = compileContext;
resultRangePosition = compileContext.getNextRangeVarIndex();
rangeVariableList = new HsqlArrayList();
exprColumnList = new HsqlArrayList();
sortAndSlice = SortAndSlice.noSort;
}
开发者ID:s-store,项目名称:s-store,代码行数:11,代码来源:QuerySpecification.java
注:本文中的org.hsqldb.lib.HsqlArrayList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论