use of org.apache.derby.iapi.sql.dictionary.ColumnDescriptorList in project derby by apache.
the class MatchingClauseNode method buildFullColumnList.
/**
* <p>
* Build the full column list for a table.
* </p>
*/
private ResultColumnList buildFullColumnList(TableDescriptor td) throws StandardException {
ResultColumnList result = new ResultColumnList(getContextManager());
ColumnDescriptorList cdl = td.getColumnDescriptorList();
int cdlSize = cdl.size();
for (int index = 0; index < cdlSize; index++) {
ColumnDescriptor colDesc = cdl.elementAt(index);
ColumnReference columnRef = new ColumnReference(colDesc.getColumnName(), null, getContextManager());
ResultColumn resultColumn = new ResultColumn(columnRef, null, getContextManager());
result.addResultColumn(resultColumn);
}
return result;
}
use of org.apache.derby.iapi.sql.dictionary.ColumnDescriptorList in project derby by apache.
the class DataDictionaryImpl method createIdentitySequences.
/**
* Create sequence generators for all identity columns on upgrade to 10.11.
*/
void createIdentitySequences(TransactionController tc) throws StandardException {
Hashtable<UUID, TableDescriptor> tableMap = hashAllTableDescriptorsByTableId(tc);
for (UUID tableID : tableMap.keySet()) {
TableDescriptor td = getTableDescriptor(tableID);
ColumnDescriptorList cdl = td.getColumnDescriptorList();
for (ColumnDescriptor cd : cdl) {
if (cd.isAutoincrement()) {
createIdentitySequence(td, cd, tc);
}
}
}
}
Aggregations