private long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, Boolean isTransactional, TransactionFactory.Provider transactionProvider, Long updateCacheFrequency, Boolean isImmutableRows, Boolean disableWAL, Boolean isMultiTenant, Boolean storeNulls, Long guidePostWidth, Boolean appendOnlySchema, ImmutableStorageScheme immutableStorageScheme, Boolean useStatsForParallelization) throws SQLException { String schemaName = table.getSchemaName().getString(); String tableName = table.getTableName().getString(); // Ordinal position is 1-based and we don't count SALT column in ordinal position int totalColumnCount = table.getColumns().size() + (table.getBucketNum() == null ? 0 : -1); final long seqNum = table.getSequenceNumber() + 1; PreparedStatement tableUpsert = connection.prepareStatement(MUTATE_TABLE); String tenantId = connection.getTenantId() == null ? null : connection.getTenantId().getString(); try { tableUpsert.setString(1, tenantId); tableUpsert.setString(2, schemaName); tableUpsert.setString(3, tableName); tableUpsert.setString(4, expectedType.getSerializedValue()); tableUpsert.setLong(5, seqNum); tableUpsert.setInt(6, totalColumnCount + columnCountDelta); tableUpsert.execute(); } finally { tableUpsert.close(); } if (isImmutableRows != null) { mutateBooleanProperty(tenantId, schemaName, tableName, IMMUTABLE_ROWS, isImmutableRows); } if (disableWAL != null) { mutateBooleanProperty(tenantId, schemaName, tableName, DISABLE_WAL, disableWAL); }
private long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, MetaPropertiesEvaluated metaPropertiesEvaluated) throws SQLException { return incrementTableSeqNum(table, expectedType, columnCountDelta, metaPropertiesEvaluated.getIsTransactional(), metaPropertiesEvaluated.getTransactionProvider(), metaPropertiesEvaluated.getUpdateCacheFrequency(), metaPropertiesEvaluated.getIsImmutableRows(), metaPropertiesEvaluated.getDisableWAL(), metaPropertiesEvaluated.getMultiTenant(), metaPropertiesEvaluated.getStoreNulls(), metaPropertiesEvaluated.getGuidePostWidth(), metaPropertiesEvaluated.getAppendOnlySchema(), metaPropertiesEvaluated.getImmutableStorageScheme(), metaPropertiesEvaluated.getUseStatsForParallelization()); }
long indexTableSeqNum = incrementTableSeqNum(index, index.getType(), -indexColumnsToDrop.size(), null, null); dropColumnMutations(index, indexColumnsToDrop); long clientTimestamp = MutationState.getTableTimestamp(timeStamp, connection.getSCN()); connection.rollback(); long seqNum = incrementTableSeqNum(table, statement.getTableType(), -tableColumnsToDrop.size(), null, null); tableMetaData.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback();
incrementTableSeqNum(table,statement.getTableType(), 0, metaPropertiesEvaluated); tableMetadata.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback();
metaPropertiesEvaluated.getUpdateCacheFrequency() != null)) { for (PTable index : table.getIndexes()) { incrementTableSeqNum(index, index.getType(), numPkColumnsAdded, metaProperties.getNonTxToTx() ? Boolean.TRUE : null, metaPropertiesEvaluated.getUpdateCacheFrequency()); incrementTableSeqNum(table, tableType, columnDefs.size(), metaPropertiesEvaluated);
private long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, Boolean isTransactional, Long updateCacheFrequency, Boolean isImmutableRows, Boolean disableWAL, Boolean isMultiTenant, Boolean storeNulls, Long guidePostWidth, Boolean appendOnlySchema, ImmutableStorageScheme immutableStorageScheme , Boolean useStatsForParallelization) throws SQLException { String schemaName = table.getSchemaName().getString(); String tableName = table.getTableName().getString(); // Ordinal position is 1-based and we don't count SALT column in ordinal position int totalColumnCount = table.getColumns().size() + (table.getBucketNum() == null ? 0 : -1); final long seqNum = table.getSequenceNumber() + 1; PreparedStatement tableUpsert = connection.prepareStatement(MUTATE_TABLE); String tenantId = connection.getTenantId() == null ? null : connection.getTenantId().getString(); try { tableUpsert.setString(1, tenantId); tableUpsert.setString(2, schemaName); tableUpsert.setString(3, tableName); tableUpsert.setString(4, expectedType.getSerializedValue()); tableUpsert.setLong(5, seqNum); tableUpsert.setInt(6, totalColumnCount + columnCountDelta); tableUpsert.execute(); } finally { tableUpsert.close(); } if (isImmutableRows != null) { mutateBooleanProperty(tenantId, schemaName, tableName, IMMUTABLE_ROWS, isImmutableRows); } if (disableWAL != null) { mutateBooleanProperty(tenantId, schemaName, tableName, DISABLE_WAL, disableWAL); } if (isMultiTenant != null) {
private long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, Boolean isTransactional, TransactionFactory.Provider transactionProvider, Long updateCacheFrequency, Boolean isImmutableRows, Boolean disableWAL, Boolean isMultiTenant, Boolean storeNulls, Long guidePostWidth, Boolean appendOnlySchema, ImmutableStorageScheme immutableStorageScheme, Boolean useStatsForParallelization) throws SQLException { String schemaName = table.getSchemaName().getString(); String tableName = table.getTableName().getString(); // Ordinal position is 1-based and we don't count SALT column in ordinal position int totalColumnCount = table.getColumns().size() + (table.getBucketNum() == null ? 0 : -1); final long seqNum = table.getSequenceNumber() + 1; PreparedStatement tableUpsert = connection.prepareStatement(MUTATE_TABLE); String tenantId = connection.getTenantId() == null ? null : connection.getTenantId().getString(); try { tableUpsert.setString(1, tenantId); tableUpsert.setString(2, schemaName); tableUpsert.setString(3, tableName); tableUpsert.setString(4, expectedType.getSerializedValue()); tableUpsert.setLong(5, seqNum); tableUpsert.setInt(6, totalColumnCount + columnCountDelta); tableUpsert.execute(); } finally { tableUpsert.close(); } if (isImmutableRows != null) { mutateBooleanProperty(tenantId, schemaName, tableName, IMMUTABLE_ROWS, isImmutableRows); } if (disableWAL != null) { mutateBooleanProperty(tenantId, schemaName, tableName, DISABLE_WAL, disableWAL); }
private long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, MetaPropertiesEvaluated metaPropertiesEvaluated) throws SQLException { return incrementTableSeqNum(table, expectedType, columnCountDelta, metaPropertiesEvaluated.getIsTransactional(), metaPropertiesEvaluated.getUpdateCacheFrequency(), metaPropertiesEvaluated.getIsImmutableRows(), metaPropertiesEvaluated.getDisableWAL(), metaPropertiesEvaluated.getMultiTenant(), metaPropertiesEvaluated.getStoreNulls(), metaPropertiesEvaluated.getGuidePostWidth(), metaPropertiesEvaluated.getAppendOnlySchema(), metaPropertiesEvaluated.getImmutableStorageScheme(), metaPropertiesEvaluated.getUseStatsForParallelization()); }
private long incrementTableSeqNum(PTable table, PTableType expectedType, int columnCountDelta, MetaPropertiesEvaluated metaPropertiesEvaluated) throws SQLException { return incrementTableSeqNum(table, expectedType, columnCountDelta, metaPropertiesEvaluated.getIsTransactional(), metaPropertiesEvaluated.getTransactionProvider(), metaPropertiesEvaluated.getUpdateCacheFrequency(), metaPropertiesEvaluated.getIsImmutableRows(), metaPropertiesEvaluated.getDisableWAL(), metaPropertiesEvaluated.getMultiTenant(), metaPropertiesEvaluated.getStoreNulls(), metaPropertiesEvaluated.getGuidePostWidth(), metaPropertiesEvaluated.getAppendOnlySchema(), metaPropertiesEvaluated.getImmutableStorageScheme(), metaPropertiesEvaluated.getUseStatsForParallelization()); }
long indexTableSeqNum = incrementTableSeqNum(index, index.getType(), -indexColumnsToDrop.size(), null, null); dropColumnMutations(index, indexColumnsToDrop); long clientTimestamp = MutationState.getTableTimestamp(timeStamp, connection.getSCN()); connection.rollback(); long seqNum = incrementTableSeqNum(table, statement.getTableType(), -tableColumnsToDrop.size(), null, null); tableMetaData.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback();
long indexTableSeqNum = incrementTableSeqNum(index, index.getType(), -indexColumnsToDrop.size(), null, null); dropColumnMutations(index, indexColumnsToDrop); long clientTimestamp = MutationState.getTableTimestamp(timeStamp, connection.getSCN()); connection.rollback(); long seqNum = incrementTableSeqNum(table, statement.getTableType(), -tableColumnsToDrop.size(), null, null); tableMetaData.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback();
incrementTableSeqNum(table,statement.getTableType(), 0, metaPropertiesEvaluated); tableMetadata.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback();
incrementTableSeqNum(table,statement.getTableType(), 0, metaPropertiesEvaluated); tableMetadata.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback();
incrementTableSeqNum(index, index.getType(), numPkColumnsAdded, metaProperties.getNonTxToTx() ? Boolean.TRUE : null, metaPropertiesEvaluated.getUpdateCacheFrequency()); incrementTableSeqNum(table, tableType, columnDefs.size(), metaPropertiesEvaluated);
metaPropertiesEvaluated.getUpdateCacheFrequency() != null)) { for (PTable index : table.getIndexes()) { incrementTableSeqNum(index, index.getType(), numPkColumnsAdded, metaProperties.getNonTxToTx() ? Boolean.TRUE : null, metaPropertiesEvaluated.getUpdateCacheFrequency()); incrementTableSeqNum(table, tableType, columnDefs.size(), metaPropertiesEvaluated);