ORMLite加入与查询生成器查询 [英] ORMLite Join Queries with Query Builder

查看:205
本文介绍了ORMLite加入与查询生成器查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在与一些认识问题ormlite连接查询。
ormlite查询生成器支持4个连接方法。

  1。加入()
2. joinOr();
3. leftJoin();
4. leftJoinOr();

我可以理解加入()下图说明了join()方法。

请给我解释一下其它连接使用类似的图片的方法呢?

(我能理解其他参加一般SQL类型,但是当涉及到​​ORMLite查询生成器方法不同,似乎)

这个职位拍摄的照片。


解决方案

  

请给我解释一下其它连接使用类似的图片的方法呢?


我花了很多时间的javadoc。他们应该是有帮助的。他们解释正在使用的SQL,而且或部分。


  1. 加入()是一样的SQL INNER JOIN 为<一个href=\"http://ormlite.com/javadoc/ormlite-core/com/j256/ormlite/stmt/QueryBuilder.html#join%28com.j256.ormlite.stmt.QueryBuilder%29\"相对=nofollow>中的javadoc说明的。那你的图片相匹配。


  2. joinOr()是一样的SQL INNER JOIN WHERE 部分是逻辑与的一起作为<一个href=\"http://ormlite.com/javadoc/ormlite-core/com/j256/ormlite/stmt/QueryBuilder.html#joinOr%28com.j256.ormlite.stmt.QueryBuilder%29\"相对=nofollow>中的javadoc说明的。同样的画面#1。


  3. leftJoin()是一样的(等待它)一个SQL LEFT JOIN 为<一个href=\"http://ormlite.com/javadoc/ormlite-core/com/j256/ormlite/stmt/QueryBuilder.html#leftJoin%28com.j256.ormlite.stmt.QueryBuilder%29\"相对=nofollow>中的javadoc说明的。这相当于添加到红色的区域。请参阅您的链接帖子并查找 LEFT JOIN


  4. leftJoinOr()是一样的SQL LEFT JOIN 以及但是,其中两个查询部分是逻辑与的一起作为<一个href=\"http://ormlite.com/javadoc/ormlite-core/com/j256/ormlite/stmt/QueryBuilder.html#leftJoinOr%28com.j256.ormlite.stmt.QueryBuilder%29\"相对=nofollow>中的javadoc说明的。同样图片为#3。


I'm having some issue with understanding join queries in ormlite. ormlite query builder supports 4 join methods.

1. join()
2. joinOr();
3. leftJoin();
4. leftJoinOr();

I can understand join() following picture illustrates join() method.

Please explain me other join methods using similar pictures?

(I can understand other join types in generic SQL, but when it comes to ORMLite query builder methods are different it seems)

Pictures taken from this post.

解决方案

Please explain me other join methods using similar pictures?

I've spent a lot of time on the javadocs. They should be helpful. They explain what SQL is being used and that the "Or" part is.

  1. join() is the same as a SQL INNER JOIN as stated in the javadocs. That matches your picture.

  2. joinOr() is the same as a SQL INNER JOIN but the WHERE parts of the two queries are "OR'd" together as stated in the javadocs. Same picture as #1.

  3. leftJoin() is the same as (wait for it) a SQL LEFT JOIN as stated in the javadocs. That corresponds to adding A to the area in red. See your linked post and look for LEFT JOIN.

  4. leftJoinOr() is the same as a SQL LEFT JOIN as well but the WHERE parts of the two queries are "OR'd" together as stated in the javadocs. Same picture as #3.

这篇关于ORMLite加入与查询生成器查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆