正文
Atitit.sql where条件表达式的原理 attilax概括
小程序:扫一扫查出行
【扫一扫了解最新限行尾号】
复制小程序
【扫一扫了解最新限行尾号】
复制小程序
Atitit.sql where条件表达式的原理 attilax概括
1. 数据查询接口sql api标准化1
2. Sql接口的问题2
2.1. 虽然sql是结构化的dsl,但是任然是编程语言类型的dsl2
2.2. Sql是文本化的dsl,虽然有一些sql解析工具,但是任然可能不够好,导致解析困难。。2
2.3. 以及只能使用标准化的sql函数2
2.4. 很难用来查询编程语言数据结构以及文件夹等2
3. 扩展sql接口。。Ssql2
3.1. 更加的结构化,容易解析。。2
3.2. 统一内出数据,cache,数据库,文件夹的查询api2
3.3. 可使用自定义函数直接查询业务系统2
4. 可供参考使sql Express接口2
4.1. SimpleExpression3
4.2. BetweenExpression3
4.3. EmptyExpression3
4.4. IdentifierEqExpression(Object value) {3
4.5. InExpression3
4.6. LikeExpression3
4.7. protected LogicalExpression(Criterion lhs, Criterion rhs, String op) {4
4.8. NotEmptyExpression4
4.9. NotExpression4
4.10. NotNullExpression5
4.11. NullExpression5
4.12. PropertyExpression5
4.13. SQLCriterion5
4.14. SubqueryExpression5
5. public enum MatchMode { EXACT, START, END, ANYWHERE;5
1. 数据查询接口sql api标准化
目前的查询数据现状::
Sql方式,但大多数原来查了就询数据库。对其他数据的查询支持不佳
Linq方式,可以查询编程语言内部数据结构了。。
使用编程语言来查询,繁琐。。太细节化。
业务系统的查询没有一个统一标准化的查询方式
作者:: 老哇的爪子 Attilax 艾龙, EMAIL:1466519819@qq.com
转载请注明来源: http://www.cnblogs.com/attilax/
2. Sql接口的问题2.1. 虽然sql是结构化的dsl,但是任然是编程语言类型的dsl2.2. Sql是文本化的dsl,虽然有一些sql解析工具,但是任然可能不够好,导致解析困难。。2.3. 以及只能使用标准化的sql函数2.4. 很难用来查询编程语言数据结构以及文件夹等
2.2. Sql是文本化的dsl,虽然有一些sql解析工具,但是任然可能不够好,导致解析困难。。2.3. 以及只能使用标准化的sql函数2.4. 很难用来查询编程语言数据结构以及文件夹等
2.4. 很难用来查询编程语言数据结构以及文件夹等
虽然已经有linq等方式
3. 扩展sql接口。。Ssql3.1. 更加的结构化,容易解析。。
不是有语言方式。贯彻数据即使代码风格。。使用json来书写ssql,,更加的结构化,容易解析。。
3.2. 统一内出数据,cache,数据库,文件夹的查询api3.3. 可使用自定义函数直接查询业务系统4. 可供参考使sql Express接口
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. EmptyExpression4.4. IdentifierEqExpression(Object value) {4.5. InExpression
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. NullExpression4.12. PropertyExpression
protected PropertyExpression(String propertyName, String otherPropertyName,
String op) {