nutzam/nutz — pull request #676 by InsideZhou (2014-06-23 13:21:11+00:00)
Title: 让Sqls.create生成的自定义sql可以嵌入另一个DaoStatement，以支持子查询。

测试里的这几行代码可以说明这个提交的意图。

Pojo user = dao.queryStatement(User.class, Cnd.where("flags", "=", 3).and("name", "=", "user"));
Pojo role = dao.queryStatement(Role.class, Cnd.where("flags", "=", 1).and("name", "=", "role"));
Sql sql = Sqls.create("select * from ($usr) t1 JOIN ($role) t2 on t1.OID = t2.OID where t1.flags=@flags1 and t2.flags=@flags2");
sql.vars().set("usr", user);
sql.vars().set("role", role);
sql.params().set("flags1", 3);
sql.params().set("flags2", 1);