设为首页 加入收藏

TOP

Atitit.sql where条件表达式的原理 attilax概括
2015-11-21 01:27:16 来源: 作者: 【 】 浏览:0
Tags:Atitit.sql where 条件 表达式 原理 attilax 概括
1. 数据查询接口sql api标准化
目前的查询数据现状::
?
Sql方式,但大多数原来查了就询数据库。对其他数据的查询支持不佳
?
Linq方式,可以查询 编程语言内部数据结构了。。
?
使用编程语言来查询,繁琐。。太细节化。
?
业务系统的查询没有一个统一标准化的查询方式
?
2. Sql接口的问题
2.1. 虽然sql是结构化的dsl,但是任然是编程语言类型的dsl
2.2. Sql是文本化的dsl,虽然有一些sql解析工具,但是任然可能不够好,导致解析困难。。
2.3. 以及只能使用标准化的sql函数
2.4. 很难用来查询编程语言数据结构以及文件夹等
虽然已经有linq等方式
?
3. 扩展sql接口。。Ssql
3.1. 更加的结构化,容易解析。。
不是有语言方式。贯彻数据即使代码风格。。使用json来书写ssql,,更加的结构化,容易解析。。
?
3.2. ? 统一内出数据,cache, 数据库,文件夹的查询api
3.3. 可使用自定义函数直接查询业务 系统
4. 可供参考使sql ?Express接口
SimpleExpression ?hb没有Express接口。。即使crition接口。。
?
关于sql解析方面的资料太少,只好使用orm hb的 api模式
?
4.1. SimpleExpression
protected SimpleExpression(String propertyName, Object value, String op) {
?
4.2. BetweenExpression
?
protected BetweenExpression(String propertyName, Object lo, Object hi) {
?
4.3. EmptyExpression
?
4.4. ?IdentifierEqExpression(Object value) {
?
4.5. InExpression
?
InExpression(String propertyName, Object[] values)
?
4.6. LikeExpression
?
protected LikeExpression(String propertyName, String value,
?
Character escapeChar, boolean ignoreCase) {
?
this.propertyName = propertyName;
?
this.value = value;
?
this.escapeChar = escapeChar;
?
this.ignoreCase = ignoreCase;
?
}
?
protected LikeExpression(String propertyName, String value) {
?
this(propertyName, value, null, false);
?
}
?
protected LikeExpression(String propertyName, String value,
?
MatchMode matchMode) {
?
this(propertyName, matchMode.toMatchString(value));
?
}
?
protected LikeExpression(String propertyName, String value,
?
MatchMode matchMode, Character escapeChar, boolean ignoreCase) {
?
this(propertyName, matchMode.toMatchString(value), escapeChar,
?
ignoreCase);
?
}
?
4.7. protected LogicalExpression(Criterion lhs, Criterion rhs, String op) {
this.lhs = lhs;
?
this.rhs = rhs;
?
this.op = op;
?
4.8. NotEmptyExpression?
public class NotEmptyExpression extends AbstractEmptinessExpression implements
?
Criterion {
?
protected NotEmptyExpression(String propertyName) {
?
4.9. NotExpression
protected NotExpression(Criterion criterion) {
?
4.10. NotNullExpression
protected NotNullExpression(String propertyName) {
?
4.11. NullExpression
?
4.12. PropertyExpression
protected PropertyExpression(String propertyName, String otherPropertyName,
?
String op) {
?
4.13. SQLCriterion
?
4.14. SubqueryExpression
5. public enum MatchMode { ?EXACT, START, END, ANYWHERE;
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇范例创建ThinkPad​数据库 下一篇Atitit.分区对索引的影响 分区索..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: