general: General SQL Snippet Functions

Description Usage Functions Examples

Description

Create SQL snippets to build SQL queries.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
FROM('table1', 'table2')
FROM(t1 = 'table1', t2 = 'table2')
WHERE('col1 IS NOT NULL')
WHERE(cond = TRUE, 'col1 = 2', 'col2 >= 10')
WHERE(cond = FALSE, 'col1 = 2', 'col2 >= 10')
AND(eq(id = 3, class = 'text_value'), geq(date = '2017-06-14'))
OR(eq(id = 9, id = 12), leq(id = 5))
GROUP_BY('col1', 'col2', 'col3')
LIMIT(10)
ORDER_BY('col1', 'col2', 'col3')
ORDER_BY(DESC('col1'), 'col2', ASC('col3'))

gadenbuie/sqrrrl documentation built on May 24, 2019, 4:04 a.m.