insertInto("foo").value("k", 1).value("v", uuid()), insertInto("foo").value("k", 1).value("v", Sets.newHashSet(fcall("token", "k"))), insertInto("foo").value("k", 1).value("v", Sets.newHashSet(now())), insertInto("foo").value("k", 1).value("v", Sets.newHashSet(uuid())), insertInto("foo").values(new String[] {"k", "v"}, new Object[] {1, fcall("token", "k")}), insertInto("foo").values(new String[] {"k", "v"}, new Object[] {1, now()}), insertInto("foo").values(new String[] {"k", "v"}, new Object[] {1, uuid()}), insertInto("foo") .values( .values(new String[] {"k", "v"}, new Object[] {1, ImmutableMap.of("foo", now())}), insertInto("foo") .values(new String[] {"k", "v"}, new Object[] {1, ImmutableMap.of("foo", uuid())}), insertInto("foo") .values( .values(new String[] {"k", "v"}, new Object[] {1, ImmutableMap.of(now(), "foo")}), insertInto("foo") .values(new String[] {"k", "v"}, new Object[] {1, ImmutableMap.of(uuid(), "foo")}), update("foo").with(set("v", fcall("token", "k"))).where(eq("k", 1)), update("foo").with(set("v", now())).where(eq("k", 1)), update("foo").with(set("v", uuid())).where(eq("k", 1)), update("foo").with(set("v", Lists.newArrayList(fcall("token", "k")))).where(eq("k", 1)), update("foo").with(set("v", Lists.newArrayList(now()))).where(eq("k", 1)), update("foo").with(set("v", Lists.newArrayList(uuid()))).where(eq("k", 1)), delete().from("foo").where(lt("k", fcall("now"))), delete().from("foo").where(lt("k", now())),
protected RegularStatement addStatement(GCEvent event) { return (RegularStatement) QueryBuilder.insertInto(TABLE_NAME).value("id", event.id() != null ? UUID.fromString(event.id()) : uuid()) .value("parent_id", event.parentEvent().isPresent() ? UUID.fromString(event.parentEvent().orElse(null)) : null) .value("analyse_id", UUID.fromString(event.analyseId())) .value("bucket_id", event.bucketId()) .value("date", event.occurred().toString(DATE_PATTERN)) .value("jvm_id", event.jvmId()) .value("description", event.description()) .value("tmstm", event.timestamp()) .value("written_at", UUIDGen.getTimeUUID(event.occurred().getMillis())) .value("occurred", event.occurred().getMillis()) .value("cause", event.cause().type()) .value("properties", event.properties()) .value("vm_event_type", event.vmEventType().type()) .value("capacity", Arrays.asList(event.capacity().usedBefore(), event.capacity().usedAfter(), event.capacity().total())) .value("total_capacity", Arrays.asList(event.totalCapacity().usedBefore(), event.totalCapacity().usedAfter(), event.totalCapacity().total())) .value("pause_mu", event.pauseMu()) .value("user_time", event.user()) .value("sys_time", event.sys()) .value("real_time", event.real()) .value("phase", event.phase().type()) .value("generations", EnumSetUtils.encode(event.generations())) .value("concurrency", event.concurrency().type()) .value("gen_cap_before", processKeyMap(event.capacityByGeneration(), Generation::type, Capacity::usedBefore)) .value("gen_cap_after", processKeyMap(event.capacityByGeneration(), Generation::type, Capacity::usedAfter)) .value("gen_cap_total", processKeyMap(event.capacityByGeneration(), Generation::type, Capacity::total)) .value("ext", event.ext()).setConsistencyLevel(ConsistencyLevel.ONE); }
insertInto("foo").value("k", 1).value("v", uuid()), insertInto("foo").value("k", 1).value("v", Sets.newHashSet(fcall("token", "k"))), insertInto("foo").value("k", 1).value("v", Sets.newHashSet(now())), insertInto("foo").value("k", 1).value("v", Sets.newHashSet(uuid())), insertInto("foo").values(new String[] {"k", "v"}, new Object[] {1, fcall("token", "k")}), insertInto("foo").values(new String[] {"k", "v"}, new Object[] {1, now()}), insertInto("foo").values(new String[] {"k", "v"}, new Object[] {1, uuid()}), insertInto("foo") .values( .values(new String[] {"k", "v"}, new Object[] {1, ImmutableMap.of("foo", now())}), insertInto("foo") .values(new String[] {"k", "v"}, new Object[] {1, ImmutableMap.of("foo", uuid())}), insertInto("foo") .values( .values(new String[] {"k", "v"}, new Object[] {1, ImmutableMap.of(now(), "foo")}), insertInto("foo") .values(new String[] {"k", "v"}, new Object[] {1, ImmutableMap.of(uuid(), "foo")}), update("foo").with(set("v", fcall("token", "k"))).where(eq("k", 1)), update("foo").with(set("v", now())).where(eq("k", 1)), update("foo").with(set("v", uuid())).where(eq("k", 1)), update("foo").with(set("v", Lists.newArrayList(fcall("token", "k")))).where(eq("k", 1)), update("foo").with(set("v", Lists.newArrayList(now()))).where(eq("k", 1)), update("foo").with(set("v", Lists.newArrayList(uuid()))).where(eq("k", 1)), delete().from("foo").where(lt("k", fcall("now"))), delete().from("foo").where(lt("k", now())),