예제 #1
0
 public static AST.ICommonTableDefinition TableDef <TType>(
     SelectValuesExpressionNode select,
     FromExpressionNode from,
     WhereExpressionNode where     = null,
     GroupByExpressionNode groupBy = null,
     OrderByExpressionNode orderBy = null)
 {
     return(TableDef(new TableIdentifier <TType>(), select, from, where, groupBy, orderBy));
 }
예제 #2
0
 public static AST.ICommonTableDefinition TableDef <TType>(
     TableReferenceCreator <TType> c,
     SelectValuesExpressionNode select,
     FromExpressionNode from,
     WhereExpressionNode where     = null,
     GroupByExpressionNode groupBy = null,
     OrderByExpressionNode orderBy = null)
 {
     return(TableDef(c.ToTableReference(), select, from, where, groupBy, orderBy));
 }
예제 #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)))));
 }
예제 #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))))));
 }
예제 #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));
 }
예제 #6
0
 public static SelectExpressionToken PlainSelect(
     SelectValuesExpressionNode select,
     FromExpressionNode from,
     WhereExpressionNode where     = null,
     GroupByExpressionNode groupBy = null,
     OrderByExpressionNode orderBy = null)
 {
     return
         (new SelectExpressionToken(
              select,
              from,
              where.ToOption(),
              groupBy.ToOption(),
              orderBy.ToOption()));
 }
예제 #7
0
 public static SelectExpressionToken PlainSelect(
     SelectValuesExpressionNode select,
     FromExpressionNode from,
     WhereExpressionNode where     = null,
     GroupByExpressionNode groupBy = null,
     OrderByExpressionNode orderBy = null,
     LimitOffsetNode limitOffset   = null)
 {
     return
         (new SelectExpressionToken(
              select,
              from,
              where.ToOption(),
              groupBy.ToOption(),
              orderBy.ToOption(),
              limitOffset ?? new LimitOffsetNode(FSharpOption <int> .None, FSharpOption <int> .None)));
 }