-
-
Notifications
You must be signed in to change notification settings - Fork 524
Expand file tree
/
Copy pathOrderClause.cs
More file actions
71 lines (65 loc) · 1.64 KB
/
OrderClause.cs
File metadata and controls
71 lines (65 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
namespace SqlKata
{
public abstract class AbstractOrderBy : AbstractClause
{
}
public class DateOrderBy : OrderBy
{
public string Part { get; set; }
/// <inheritdoc />
public override AbstractClause Clone()
{
return new DateOrderBy
{
Engine = Engine,
Component = Component,
Column = Column,
Part= Part,
Ascending = Ascending
};
}
}
public class OrderBy : AbstractOrderBy
{
public string Column { get; set; }
public bool Ascending { get; set; } = true;
/// <inheritdoc />
public override AbstractClause Clone()
{
return new OrderBy
{
Engine = Engine,
Component = Component,
Column = Column,
Ascending = Ascending
};
}
}
public class RawOrderBy : AbstractOrderBy
{
public string Expression { get; set; }
public object[] Bindings { set; get; }
/// <inheritdoc />
public override AbstractClause Clone()
{
return new RawOrderBy
{
Engine = Engine,
Component = Component,
Expression = Expression,
Bindings = Bindings,
};
}
}
public class OrderByRandom : AbstractOrderBy
{
/// <inheritdoc />
public override AbstractClause Clone()
{
return new OrderByRandom
{
Engine = Engine,
};
}
}
}