Created
September 2, 2015 15:50
-
-
Save jsanda/44389f291cc941beb011 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Schema for metrics_idx is | |
// | |
// CREATE TABLE metrics_idx ( | |
// tenant_id text, | |
// type int, | |
// interval text, | |
// metric text, | |
// PRIMARY KEY ((tenant_id, type), interval, metric) | |
// ); | |
String indexQuery = "INSERT INTO metrics_idx (tenant_id, type, interval, metric) VALUES (?, ?, ?, ?)"; | |
primingClient.prime(PrimingRequest.preparedStatementBuilder() | |
.withQuery(indexQuery) | |
.withColumnTypes( | |
column("tenant_id", PrimitiveType.TEXT), | |
column("type", PrimitiveType.INT), | |
column("interval", PrimitiveType.TEXT), | |
column("metric", PrimitiveType.TEXT)) | |
// .withVariableTypes(PrimitiveType.TEXT, PrimitiveType.INT, PrimitiveType.TEXT, PrimitiveType.TEXT) | |
.build()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment