private string CreateOrderByString(OrderByStatement orderByStatement, string tableName, Func <string, string> escape) { var direction = orderByStatement.Direction == OrderByDirection.Ascending ? "" : " DESC"; var columnReference = new ColumnReference(orderByStatement.PropertyName, tableName, escape); return(columnReference + direction); }
private string CreateColumnSelectString(string columnName, AliasedSqlSubQuery subQuery) { var alias = string.Format("{0} {1}", subQuery.TableIdentifier, columnName); var columnReference = new ColumnReference(columnName, subQuery.TableIdentifier, Escape); return(string.Format("{0} AS \"{1}\"", columnReference, alias)); }
private string CreateOrderByString(OrderByStatement orderByStatement, string tableName, Func<string, string> escape) { var direction = orderByStatement.Direction == OrderByDirection.Ascending ? "" : " DESC"; var columnReference = new ColumnReference(orderByStatement.PropertyName, tableName, escape); return columnReference + direction; }
public void Visit(PropertyExpression expression) { if (expression.PropertyType == typeof(bool)) { var columnName = expression.PropertyName; var columnReference = new ColumnReference(columnName, Escape); ConstraintCommandText = string.Format("{0} = 1", columnReference); } }
public void Visit(EqualsExpression expression) { if (expression.ValueExpression.Value == null) { var columnName = expression.PropertyExpression.PropertyName; var columnReference = new ColumnReference(columnName, Escape); ConstraintCommandText = string.Format("{0} IS NULL", columnReference); } else { VisitBinaryComparisonExpression(expression, "="); } }