@Override public boolean isAutoIncrement() { return column.getSequence() != null; }
public void setColumn(Column column) { table = column.getTable(); sequence = column.getSequence(); if (sequence == null && !ifExists) { throw DbException.get(ErrorCode.SEQUENCE_NOT_FOUND_1, column.getSQL()); } }
/** * For the given list of columns, create sequences for auto-increment * columns (if needed), and then get the list of all sequences of the * columns. * * @param columns the columns * @param temporary whether generated sequences should be temporary * @return the list of sequences (may be empty) */ protected ArrayList<Sequence> generateSequences(ArrayList<Column> columns, boolean temporary) { ArrayList<Sequence> sequences = New.arrayList(); if (columns != null) { for (Column c : columns) { if (c.isAutoIncrement()) { int objId = getObjectId(); c.convertAutoIncrementToSequence(session, getSchema(), objId, temporary); if (!Constants.CLUSTERING_DISABLED.equals(session.getDatabase().getCluster())) { throw DbException.getUnsupportedException("CLUSTERING && auto-increment columns"); } } Sequence seq = c.getSequence(); if (seq != null) { sequences.add(seq); } } } return sequences; }
Sequence seq = col.getSequence(); if (seq != null) { table.removeSequence(seq);
Sequence sequence = oldColumn == null ? null : oldColumn.getSequence(); checkDefaultReferencesTable(table, defaultExpression); oldColumn.setSequence(null);
if (col.getSequence() != null) throw new IgniteSQLException("SEQUENCE columns are not supported [colName=" + col.getName() + ']', IgniteQueryErrorCode.UNSUPPORTED_OPERATION);
for (int j = 0; j < cols.length; j++) { Column c = cols[j]; Sequence sequence = c.getSequence(); add(rows,
@Override public boolean isAutoIncrement() { return column.getSequence() != null; }
@Override public boolean isAutoIncrement() { return column.getSequence() != null; }
public boolean isAutoIncrement() { return column.getSequence() != null; }
public void setColumn(Column column) throws SQLException { table = column.getTable(); sequence = column.getSequence(); if (sequence == null) { throw Message.getSQLException(ErrorCode.SEQUENCE_NOT_FOUND_1, column.getSQL()); } }
public void setColumn(Column column) { table = column.getTable(); sequence = column.getSequence(); if (sequence == null && !ifExists) { throw DbException.get(ErrorCode.SEQUENCE_NOT_FOUND_1, column.getSQL()); } }
private void unlinkSequences(Table table) throws SQLException { Column[] columns = table.getColumns(); for (int i = 0; i < columns.length; i++) { // if we don't do that, the sequence is dropped when the table is // dropped Sequence seq = columns[i].getSequence(); if (seq != null) { table.removeSequence(session, seq); columns[i].setSequence(null); } } }
public void setColumn(Column column) { table = column.getTable(); sequence = column.getSequence(); if (sequence == null && !ifExists) { throw DbException.get(ErrorCode.SEQUENCE_NOT_FOUND_1, column.getSQL()); } }
Sequence seq = col.getSequence(); if (seq != null) { table.removeSequence(seq);
Sequence sequence = oldColumn == null ? null : oldColumn.getSequence(); checkDefaultReferencesTable(table, defaultExpression); oldColumn.setSequence(null);
Sequence sequence = oldColumn == null ? null : oldColumn.getSequence(); checkDefaultReferencesTable(table, defaultExpression); oldColumn.setSequence(null);
if (col.getSequence() != null) throw new IgniteSQLException("SEQUENCE columns are not supported [colName=" + col.getName() + ']', IgniteQueryErrorCode.UNSUPPORTED_OPERATION);
c.convertAutoIncrementToSequence(session, getSchema(), objId, temporary); Sequence seq = c.getSequence(); if (seq != null) { sequences.add(seq);
table.checkSupportAlter(); table.lock(session, true, true); Sequence sequence = oldColumn == null ? null : oldColumn.getSequence(); switch (type) { case NOT_NULL: {