-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathAlias.java
More file actions
64 lines (52 loc) · 1.22 KB
/
Copy pathAlias.java
File metadata and controls
64 lines (52 loc) · 1.22 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
package jaskell.sql;
import jaskell.script.Directive;
import jaskell.script.Parameter;
import java.util.List;
public class Alias implements Directive, CouldJoin {
Directive _query;
private final Name _name;
public Alias(String name){
this._name = new Name(name);
}
@Override
public String script() {
return String.format("(%s) AS %s",
_query.script(),
_name.script());
}
@Override
public List<Parameter<?>> parameters() {
return _query.parameters();
}
public Join join(Directive other){
Join re = new Join();
re._prefix = this;
re._join = other;
return re;
}
public Left left(){
Left re = new Left();
re._prefix = this;
return re;
}
public Right right(){
Right re = new Right();
re._prefix = this;
return re;
}
public Full full(){
Full re = new Full();
re._prefix = this;
return re;
}
public Inner inner(){
Inner re = new Inner();
re._prefix = this;
return re;
}
public Cross cross(){
Cross re = new Cross();
re._prefix = this;
return re;
}
}