Atitit.sql where条件表达式的原理 attilax概括
2.1. 虽然sql是结构化的dsl,但是任然是编程语言类型的dsl2
2.2. Sql是文本化的dsl,虽然有一些sql解析工具,但是任然可能不够好,导致解析困难。。2
3.2. 统一内出数据,cache,数据库,文件夹的查询api2
4.4. IdentifierEqExpression(Object value) {3
4.7. protected LogicalExpression(Criterion lhs, Criterion rhs, String op) {4
5. public enum MatchMode { EXACT, START, END, ANYWHERE;5
目前的查询数据现状::
Sql方式,但大多数原来查了就询数据库。对其他数据的查询支持不佳
Linq方式,可以查询编程语言内部数据结构了。。
使用编程语言来查询,繁琐。。太细节化。
业务系统的查询没有一个统一标准化的查询方式
作者:: 老哇的爪子 Attilax 艾龙, EMAIL:1466519819@qq.com
转载请注明来源: http://www.cnblogs.com/attilax/
虽然已经有linq等方式
不是有语言方式。贯彻数据即使代码风格。。使用json来书写ssql,,更加的结构化,容易解析。。
SimpleExpression hb没有Express接口。。即使crition接口。。
关于sql解析方面的资料太少,只好使用orm hb的 api模式
protected SimpleExpression(String propertyName, Object value, String op) {
protected BetweenExpression(String propertyName, Object lo, Object hi) {
InExpression(String propertyName, Object[] values)
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);
}
this.lhs = lhs;
this.rhs = rhs;
this.op = op;
public class NotEmptyExpression extends AbstractEmptinessExpression implements
Criterion {
protected NotEmptyExpression(String propertyName) {
protected NotExpression(Criterion criterion) {
protected NotNullExpression(String propertyName) {
protected PropertyExpression(String propertyName, String otherPropertyName,
String op) {
Atitit.sql where条件表达式的原理 attilax概括
原文:http://www.cnblogs.com/attilax/p/4936886.html