Definition at line 26 of file ExpressionStringBuilder.cs.
Deveel.Data.Sql.Expressions.ExpressionStringBuilder.ExpressionStringBuilder |
( |
| ) |
|
|
inline |
static string Deveel.Data.Sql.Expressions.ExpressionStringBuilder.GetBinaryOperatorString |
( |
SqlExpressionType |
expressionType | ) |
|
|
inlinestaticprivate |
Definition at line 60 of file ExpressionStringBuilder.cs.
61 switch (expressionType) {
123 throw new NotSupportedException();
SqlExpressionType
All the possible type of SqlExpression supported
string Deveel.Data.Sql.Expressions.ExpressionStringBuilder.GetUnaryOperatorString |
( |
SqlExpressionType |
unaryType | ) |
|
|
inlineprivate |
Definition at line 339 of file ExpressionStringBuilder.cs.
348 throw new NotSupportedException();
SqlExpressionType
All the possible type of SqlExpression supported
void Deveel.Data.Sql.Expressions.ExpressionStringBuilder.PrintFromClause |
( |
FromClause |
fromClause | ) |
|
|
inlineprivate |
Definition at line 260 of file ExpressionStringBuilder.cs.
261 if (fromClause == null || fromClause.IsEmpty)
266 var tables = fromClause.AllTables.ToList();
267 for (
int i = 0; i < tables.Count; i++) {
268 var source = tables[i];
270 JoinPart joinPart = null;
273 joinPart = fromClause.GetJoinPart(i - 1);
274 if (joinPart != null) {
275 if (joinPart.JoinType ==
JoinType.Inner) {
276 builder.Append(
" INNER JOIN ");
277 }
else if (joinPart.JoinType ==
JoinType.Right) {
278 builder.Append(
" RIGHT OUTER JOIN ");
279 }
else if (joinPart.JoinType ==
JoinType.Left) {
280 builder.Append(
" LEFT OUTER JOIN ");
281 }
else if (joinPart.JoinType ==
JoinType.Full) {
282 builder.Append(
" FULL OUTER JOINT ");
287 if (source.IsSubQuery) {
289 Visit(source.SubQuery);
295 if (!
String.IsNullOrEmpty(source.Alias)) {
300 if (i < tables.Count - 1) {
301 if (joinPart == null) {
305 Visit(joinPart.OnExpression);
A long string in the system.
JoinType
Enumerates the kind of group join in a selection query.
readonly StringBuilder builder
virtual SqlExpression Visit(SqlExpression expression)
Visits a given SQL expression.
void Deveel.Data.Sql.Expressions.ExpressionStringBuilder.PrintQueryColumns |
( |
IEnumerable< SelectColumn > |
selectColumns | ) |
|
|
inlineprivate |
Definition at line 195 of file ExpressionStringBuilder.cs.
196 var columns = selectColumns.ToArray();
197 var sz = columns.Length;
198 for (
int i = 0; i < sz; i++) {
199 var column = columns[i];
205 builder.AppendFormat(
"{0}.*", column.TableName);
208 Visit(column.Expression);
211 if (!
String.IsNullOrEmpty(column.Alias))
212 builder.AppendFormat(
" AS {0}", column.Alias);
A long string in the system.
readonly StringBuilder builder
virtual SqlExpression Visit(SqlExpression expression)
Visits a given SQL expression.
string Deveel.Data.Sql.Expressions.ExpressionStringBuilder.ToSqlString |
( |
SqlExpression |
expression | ) |
|
|
inline |
Definition at line 34 of file ExpressionStringBuilder.cs.
35 rootQuery = expression is SqlQueryExpression;
readonly StringBuilder builder
virtual SqlExpression Visit(SqlExpression expression)
Visits a given SQL expression.
- Parameters
-
- Returns
Reimplemented from Deveel.Data.Sql.Expressions.SqlExpressionVisitor.
Definition at line 49 of file ExpressionStringBuilder.cs.
50 Visit(binaryEpression.Left);
53 builder.AppendFormat(
" {0} ", binaryOpString);
55 Visit(binaryEpression.Right);
57 return binaryEpression;
static string GetBinaryOperatorString(SqlExpressionType expressionType)
readonly StringBuilder builder
virtual SqlExpression Visit(SqlExpression expression)
Visits a given SQL expression.
- Parameters
-
- Returns
Reimplemented from Deveel.Data.Sql.Expressions.SqlExpressionVisitor.
Definition at line 140 of file ExpressionStringBuilder.cs.
141 var value = constant.Value;
151 var sz = array.Length;
152 for (
int i = 0; i < sz; i++) {
160 }
else if (value.Type is
NullType) {
162 }
else if (value.Type.IsPrimitive) {
readonly StringBuilder builder
A data type that represents the NULL value of a given SQL data type.
An object that provides methods for accessing a finite collection of SQL expressions.
virtual SqlExpression Visit(SqlExpression expression)
Visits a given SQL expression.
Visits the expression that calls the function defined.
- Parameters
-
- Returns
Reimplemented from Deveel.Data.Sql.Expressions.SqlExpressionVisitor.
Definition at line 173 of file ExpressionStringBuilder.cs.
174 builder.Append(expression.FunctioName);
177 if (expression.Arguments != null &&
178 expression.Arguments.Length > 0) {
179 var args = expression.Arguments;
180 var argc = args.Length;
182 for (
int i = 0; i < argc; i++) {
readonly StringBuilder builder
virtual SqlExpression Visit(SqlExpression expression)
Visits a given SQL expression.
- Parameters
-
- Returns
Reimplemented from Deveel.Data.Sql.Expressions.SqlExpressionVisitor.
Definition at line 219 of file ExpressionStringBuilder.cs.
232 if (query.WhereExpression != null) {
234 Visit(query.WhereExpression);
237 if (query.GroupBy != null) {
241 if (query.HavingExpression != null) {
243 Visit(query.HavingExpression);
247 if (query.GroupMax != null) {
249 builder.Append(query.GroupMax.FullName);
void PrintFromClause(FromClause fromClause)
virtual SqlExpression[] VisitExpressionList(SqlExpression[] list)
Visits a list of expressions given.
void PrintQueryColumns(IEnumerable< SelectColumn > selectColumns)
readonly StringBuilder builder
virtual SqlExpression Visit(SqlExpression expression)
Visits a given SQL expression.
readonly StringBuilder Deveel.Data.Sql.Expressions.ExpressionStringBuilder.builder |
|
private |
bool Deveel.Data.Sql.Expressions.ExpressionStringBuilder.rootQuery = true |
|
private |
The documentation for this class was generated from the following file: