ORMLite加入与查询生成器查询 [英] ORMLite Join Queries with Query Builder
问题描述
我在与一些认识问题ormlite连接查询。
ormlite查询生成器支持4个连接方法。
1。加入()
2. joinOr();
3. leftJoin();
4. leftJoinOr();
我可以理解加入()下图说明了join()方法。
请给我解释一下其它连接使用类似的图片的方法呢?
(我能理解其他参加一般SQL类型,但是当涉及到ORMLite查询生成器方法不同,似乎)
请给我解释一下其它连接使用类似的图片的方法呢?
块引用>我花了很多时间的javadoc。他们应该是有帮助的。他们解释正在使用的SQL,而且或部分。
加入()
是一样的SQLINNER JOIN
为<一个href=\"http://ormlite.com/javadoc/ormlite-core/com/j256/ormlite/stmt/QueryBuilder.html#join%28com.j256.ormlite.stmt.QueryBuilder%29\"相对=nofollow>中的javadoc说明的。那你的图片相匹配。
joinOr()
是一样的SQLINNER 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。
leftJoin()
是一样的(等待它)一个SQLLEFT 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
。
leftJoinOr()
是一样的SQLLEFT 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.
join()
is the same as a SQLINNER JOIN
as stated in the javadocs. That matches your picture.
joinOr()
is the same as a SQLINNER JOIN
but theWHERE
parts of the two queries are "OR'd" together as stated in the javadocs. Same picture as #1.
leftJoin()
is the same as (wait for it) a SQLLEFT JOIN
as stated in the javadocs. That corresponds to adding A to the area in red. See your linked post and look forLEFT JOIN
.
leftJoinOr()
is the same as a SQLLEFT JOIN
as well but theWHERE
parts of the two queries are "OR'd" together as stated in the javadocs. Same picture as #3.
这篇关于ORMLite加入与查询生成器查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!