Mercurial > urweb
comparison tests/sql_indent.ur @ 374:1099d083a702
Indenting paren-nested SQL expressions
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 16 Oct 2008 17:15:21 -0400 |
parents | 008afab3a5ce |
children | d3de57ce4bca |
comparison
equal
deleted
inserted
replaced
373:008afab3a5ce | 374:1099d083a702 |
---|---|
1 table t1 : {A : int, B : string, C : float} | 1 table t1 : {A : int, B : string, C : float} |
2 | 2 |
3 val q1 = (SELECT * | 3 val q1 = (SELECT * |
4 FROM t1 | 4 FROM t1) |
5 WHERE A = 0) | 5 WHERE A = 0) |
6 | 6 |
7 val a1 = (INSERT INTO t1 | 7 val a1 = (INSERT INTO t1 |
8 VALUES (0, "1", 2.0)) | 8 VALUES (0, "1", 2.0)) |
9 | 9 |
10 val a2 = (UPDATE t1 | 10 val a2 = (UPDATE t1 |
11 SET A = 3, B = "4", C = 5.0) | 11 SET A = 3, B = "4", C = 5.0) |
12 | 12 |
13 val a3 = (DELETE FROM t1 | 13 val a3 = (DELETE FROM t1 |
14 WHERE B <> "good") | 14 WHERE B <> "good") |
15 | |
16 | |
17 val q2 = (SELECT * | |
18 FROM t1 | |
19 WHERE A = 0 | |
20 OR B = "hi" | |
21 AND (C <> 10.01 | |
22 OR A = 8) | |
23 AND (B = B | |
24 OR B = B | |
25 AND C = C OR (D = | |
26 6 AND 8 = 8))) |