Exemplo n.º 1
0
 public static AST.ICommonTableDefinition TableDef <TType>(
     TableReferenceCreator <TType> c,
     SetSelectExpression expr)
 {
     return
         (new AST.CommonTableDefinition <TType>(PlainSelectExpression.NewSet(expr), c));
 }
Exemplo n.º 2
0
 public static SqlExpression SelectNode(
     CommonTableExpression with,
     SetSelectExpression select)
 {
     return
         (SqlExpression.NewSelect(
              SelectExpression.NewComplex(
                  new Tuple <CommonTableExpression, PlainSelectExpression>(
                      with,
                      PlainSelectExpression.NewSet(select)))));
 }
Exemplo n.º 3
0
 public static SqlExpression SelectNode(
     SelectValuesExpressionNode select,
     FromExpressionNode from,
     WhereExpressionNode where     = null,
     GroupByExpressionNode groupBy = null,
     OrderByExpressionNode orderBy = null)
 {
     return(SqlExpression.NewSelect(
                SelectExpression.NewPlain(
                    PlainSelectExpression.NewPlain(
                        PlainSelect(select, from, where, groupBy, orderBy)))));
 }
Exemplo n.º 4
0
 public static SqlExpression SelectNode(
     CommonTableExpression with,
     SelectValuesExpressionNode select,
     FromExpressionNode from,
     WhereExpressionNode where     = null,
     GroupByExpressionNode groupBy = null,
     OrderByExpressionNode orderBy = null)
 {
     return(SqlExpression.NewSelect(
                SelectExpression.NewComplex(
                    new Tuple <CommonTableExpression, PlainSelectExpression>(
                        with,
                        PlainSelectExpression.NewPlain(PlainSelect(select, from, where, groupBy, orderBy))))));
 }
Exemplo n.º 5
0
 public static AST.ICommonTableDefinition TableDef <TType>(
     TableIdentifier <TType> tdef,
     SelectValuesExpressionNode select,
     FromExpressionNode from,
     WhereExpressionNode where     = null,
     GroupByExpressionNode groupBy = null,
     OrderByExpressionNode orderBy = null)
 {
     return
         (new AST.CommonTableDefinition <TType>(
              PlainSelectExpression.NewPlain(
                  new SelectExpressionToken(select, from, where.ToOption(), groupBy.ToOption(), orderBy.ToOption())),
              tdef));
 }
Exemplo n.º 6
0
 public static ValueNode SubExp(
     SelectValuesExpressionNode select,
     FromExpressionNode from,
     WhereExpressionNode where     = null,
     GroupByExpressionNode groupBy = null,
     OrderByExpressionNode orderBy = null)
 {
     return(ValueNode.NewSubExpression(
                PlainSelectExpression.NewPlain(
                    new SelectExpressionToken(
                        select,
                        from,
                        where.ToOption(),
                        groupBy.ToOption(),
                        orderBy.ToOption()))));
 }
Exemplo n.º 7
0
 public static ValueNode SubExp(
     SelectValuesExpressionNode select,
     FromExpressionNode from,
     WhereExpressionNode where     = null,
     GroupByExpressionNode groupBy = null,
     OrderByExpressionNode orderBy = null,
     LimitOffsetNode limitOffset   = null)
 {
     return(ValueNode.NewSubExpression(
                PlainSelectExpression.NewPlain(
                    new SelectExpressionToken(
                        select,
                        from,
                        where.ToOption(),
                        groupBy.ToOption(),
                        orderBy.ToOption(),
                        limitOffset ?? new LimitOffsetNode(FSharpOption <int> .None, FSharpOption <int> .None)))));
 }
Exemplo n.º 8
0
 public static SetSelectExpression Minus(params SelectExpressionToken[] expr)
 {
     return(new SetSelectExpression(
                AST.SetOperationType.Minus,
                ListModule.OfSeq(expr.Select(e => PlainSelectExpression.NewPlain(e)))));
 }
Exemplo n.º 9
0
 public static AST.ICommonTableDefinition TableDef <TType>(SetSelectExpression expr)
 {
     return(new AST.CommonTableDefinition <TType>(PlainSelectExpression.NewSet(expr), new TableIdentifier <TType>()));
 }