@Test public void canGetSelectQuery() { CqlQuery query = CassandraTimestampUtils.constructSelectFromTimestampTableQuery(); assertThat(query.toString()).isEqualTo("SELECT column1, value FROM \"_timestamp\" WHERE key=0x7473;"); }
public static CqlQuery constructSelectFromTimestampTableQuery() { return ImmutableCqlQuery.builder() .safeQueryFormat("SELECT %s, %s FROM %s WHERE key=%s;") .addArgs( SafeArg.of("columnName", COLUMN_NAME_COLUMN), SafeArg.of("valueColumnName", VALUE_COLUMN), SafeArg.of("tableRef", wrapInQuotes(AtlasDbConstants.TIMESTAMP_TABLE.getQualifiedName())), SafeArg.of("rowAndColumnValue", ROW_AND_COLUMN_NAME_HEX_STRING)) .build(); }
CassandraTimestampUtils { public static CqlQuery constructSelectFromTimestampTableQuery() { return ImmutableCqlQuery.builder() .safeQueryFormat("SELECT %s, %s FROM %s WHERE key=%s;") .addArgs( SafeArg.of("columnName", COLUMN_NAME_COLUMN), SafeArg.of("valueColumnName", VALUE_COLUMN), SafeArg.of("tableRef", wrapInQuotes(AtlasDbConstants.TIMESTAMP_TABLE.getQualifiedName())), SafeArg.of("rowAndColumnValue", ROW_AND_COLUMN_NAME_HEX_STRING)) .build(); } }
CassandraTimestampUtils { public static CqlQuery constructSelectFromTimestampTableQuery() { return ImmutableCqlQuery.builder() .safeQueryFormat("SELECT %s, %s FROM %s WHERE key=%s;") .addArgs( SafeArg.of("columnName", COLUMN_NAME_COLUMN), SafeArg.of("valueColumnName", VALUE_COLUMN), SafeArg.of("tableRef", wrapInQuotes(AtlasDbConstants.TIMESTAMP_TABLE.getQualifiedName())), SafeArg.of("rowAndColumnValue", ROW_AND_COLUMN_NAME_HEX_STRING)) .build(); } private  CassandraTimestampUtils(); }
CassandraTimestampUtils { public static CqlQuery constructSelectFromTimestampTableQuery() { return ImmutableCqlQuery.builder() .safeQueryFormat("SELECT %s, %s FROM %s WHERE key=%s;") .addArgs( SafeArg.of("columnName", COLUMN_NAME_COLUMN), SafeArg.of("valueColumnName", VALUE_COLUMN), SafeArg.of("tableRef", wrapInQuotes(AtlasDbConstants.TIMESTAMP_TABLE.getQualifiedName())), SafeArg.of("rowAndColumnValue", ROW_AND_COLUMN_NAME_HEX_STRING)) .build(); } private  CassandraTimestampUtils(); static CqlQuery constructCheckAndSetMultipleQuery(Map<String, Pair<byte[], byte[]>> checkAndSetRequest); static boolean isValidTimestampData(byte[] data); static CqlQuery constructSelectFromTimestampTableQuery(); static Map<String, byte[]> getValuesFromSelectionResult(CqlResult result); static void verifyCompatible(CqlResult casResult, Map<String, Pair<byte[], byte[]>> casMap); }
CassandraTimestampUtils { public static CqlQuery constructSelectFromTimestampTableQuery() { return ImmutableCqlQuery.builder() .safeQueryFormat("SELECT %s, %s FROM %s WHERE key=%s;") .addArgs( SafeArg.of("columnName", COLUMN_NAME_COLUMN), SafeArg.of("valueColumnName", VALUE_COLUMN), SafeArg.of("tableRef", wrapInQuotes(AtlasDbConstants.TIMESTAMP_TABLE.getQualifiedName())), SafeArg.of("rowAndColumnValue", ROW_AND_COLUMN_NAME_HEX_STRING)) .build(); } private  CassandraTimestampUtils(); static CqlQuery constructCheckAndSetMultipleQuery(Map<String, Pair<byte[], byte[]>> checkAndSetRequest); static boolean isValidTimestampData(byte[] data); static CqlQuery constructSelectFromTimestampTableQuery(); static Map<String, byte[]> getValuesFromSelectionResult(CqlResult result); static void verifyCompatible(CqlResult casResult, Map<String, Pair<byte[], byte[]>> casMap); static final String ROW_AND_COLUMN_NAME; static final String BACKUP_COLUMN_NAME; static final ByteString INVALIDATED_VALUE; static final long INITIAL_VALUE; }