forked from sqlfluff/sqlfluff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAM03.yml
35 lines (20 loc) · 742 Bytes
/
AM03.yml
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
rule: AM03
test_unspecified:
pass_str: SELECT * FROM t ORDER BY a
test_unspecified_unspecified:
pass_str: SELECT * FROM t ORDER BY a, b
test_unspecified_desc:
fail_str: SELECT * FROM t ORDER BY a, b DESC
fix_str: SELECT * FROM t ORDER BY a ASC, b DESC
test_asc_desc:
pass_str: SELECT * FROM t ORDER BY a ASC, b DESC
test_desc_unspecified:
fail_str: SELECT * FROM t ORDER BY a DESC, b
fix_str: SELECT * FROM t ORDER BY a DESC, b ASC
test_desc_asc:
pass_str: SELECT * FROM t ORDER BY a DESC, b ASC
test_nulls_last:
fail_str: SELECT * FROM t ORDER BY a DESC, b NULLS LAST
fix_str: SELECT * FROM t ORDER BY a DESC, b ASC NULLS LAST
test_comment:
pass_str: SELECT * FROM t ORDER BY a /* Comment */ DESC, b ASC