`
inshua
  • 浏览: 8580 次
  • 性别: Icon_minigender_1
文章分类
社区版块
存档分类
最新评论

JaQu 一个有益的尝试

阅读更多
厌倦了蹩脚的 sql,正在构思替代方案,碰巧遇到这个,挺有意思。

http://www.h2database.com/html/frame.html?jaqu.html&main

引用

JaQu stands for Java Query and allows to access databases using pure Java. JaQu replaces SQL, JDBC, and O/R frameworks such as Hibernate. JaQu is something like LINQ for Java (LINQ stands for "language integrated query" and is a Microsoft .NET technology). The following JaQu code:

Product p = new Product();
List<Product> soldOutProducts =
  db.from(p).where(p.unitsInStock).is(0).select();

stands for the SQL statement:

SELECT * FROM PRODUCTS P
WHERE P.UNITS_IN_STOCK = 0


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics