This file contains 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
var redis = require('redis'); | |
var options = { | |
host: '127.0.0.1', | |
port: '6379' | |
}; | |
var publisher = redis.createClient(options); | |
var subscriber = redis.createClient(options); | |
function sub(message) { |
This file contains 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
CriteriaBuilder cb = em.getCriteriaBuilder(); | |
CriteriaQuery<Foo> q = cb.createQuery(Foo.class); | |
Root<Foo> foo = q.from(Foo.class); | |
foo.join("bar").alias("b1"); | |
foo.alias("b1"); | |
q.select(foo).where(cb.equal(foo.get("id"), "42")); | |
foo.alias("f1"); | |
TypedQuery<Foo> query = em.createQuery(q); |