Definition at line 8 of file DeveelDbFormatter.cs.
Deveel.Data.Linq.DeveelDbFormatter.DeveelDbFormatter |
( |
DeveelDbLanguage |
language | ) |
|
|
inline |
static new string Deveel.Data.Linq.DeveelDbFormatter.Format |
( |
Expression |
expression | ) |
|
|
inlinestatic |
static string Deveel.Data.Linq.DeveelDbFormatter.Format |
( |
Expression |
expression, |
|
|
DeveelDbLanguage |
language |
|
) |
| |
|
inlinestatic |
Definition at line 17 of file DeveelDbFormatter.cs.
19 formatter.Visit(expression);
20 return formatter.ToString();
override string Deveel.Data.Linq.DeveelDbFormatter.GetOperator |
( |
BinaryExpression |
b | ) |
|
|
inlineprotected |
Definition at line 97 of file DeveelDbFormatter.cs.
98 if (b.NodeType == ExpressionType.Add && b.Type == typeof (
string))
101 return base.GetOperator(b);
override Expression Deveel.Data.Linq.DeveelDbFormatter.VisitMemberAccess |
( |
MemberExpression |
m | ) |
|
|
inlineprotected |
Definition at line 157 of file DeveelDbFormatter.cs.
158 var declaringType = m.Member.DeclaringType;
159 if (declaringType == typeof (
string)) {
160 switch (m.Member.Name) {
168 }
else if (declaringType == typeof (DateTime) ||
169 declaringType == typeof (DateTimeOffset)) {
170 switch (m.Member.Name) {
185 }
else if (declaringType == typeof (TimeSpan)) {
189 return base.VisitMemberAccess(m);
override Expression Deveel.Data.Linq.DeveelDbFormatter.VisitMethodCall |
( |
MethodCallExpression |
m | ) |
|
|
inlineprotected |
Definition at line 104 of file DeveelDbFormatter.cs.
105 var declaringType = m.Method.DeclaringType;
107 if (declaringType == typeof (
string)) {
108 switch (m.Method.Name) {
112 Visit(m.Arguments[0]);
119 Visit(m.Arguments[0]);
126 Visit(m.Arguments[0]);
131 IList<Expression> args = m.Arguments;
132 if (args.Count == 1 && args[0].NodeType == ExpressionType.NewArrayInit) {
133 args = ((NewArrayExpression) args[0]).Expressions;
135 for (
int i = 0, n = args.Count; i < n; i++) {
144 case "IsNullOrEmpty": {
145 Visit(m.Arguments[0]);
146 Write(
" IS NULL OR ");
147 Visit(m.Arguments[0]);
154 return base.VisitMethodCall(m);
override Expression Deveel.Data.Linq.DeveelDbFormatter.VisitSelect |
( |
SelectExpression @ |
select | ) |
|
|
inlineprotected |
Definition at line 23 of file DeveelDbFormatter.cs.
24 AddAliases(select.From);
28 if (select.IsDistinct)
31 WriteColumns(select.Columns);
33 if (select.From != null) {
34 WriteLine(Indentation.Same);
36 VisitSource(select.From);
39 if (select.Where != null &&
40 (select.GroupBy == null || select.GroupBy.Count ==0)) {
41 WriteLine(Indentation.Same);
43 VisitPredicate(select.Where);
46 if (select.GroupBy != null && select.GroupBy.Count > 0) {
47 WriteLine(Indentation.Same);
50 for (
int i = 0, n = select.GroupBy.Count; i < n; i++) {
55 VisitValue(select.GroupBy[i]);
58 if (select.Where != null) {
59 WriteLine(Indentation.Same);
61 VisitPredicate(select.Where);
64 if (select.OrderBy != null && select.OrderBy.Count > 0) {
65 WriteLine(Indentation.Same);
68 for (
int i = 0, n = select.OrderBy.Count; i < n; i++) {
69 OrderExpression exp = select.OrderBy[i];
74 VisitValue(exp.Expression);
76 if (exp.OrderType != OrderType.Ascending)
81 if (select.Take != null) {
82 WriteLine(Indentation.Same);
84 if (select.Skip == null) {
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb-linq/Deveel.Data.Linq/DeveelDbFormatter.cs