aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/world/db/sql.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/world/db/sql.lux32
1 files changed, 16 insertions, 16 deletions
diff --git a/stdlib/source/lux/world/db/sql.lux b/stdlib/source/lux/world/db/sql.lux
index 94563bdf1..c91c2f226 100644
--- a/stdlib/source/lux/world/db/sql.lux
+++ b/stdlib/source/lux/world/db/sql.lux
@@ -15,7 +15,7 @@
(text.enclose ["(" ")"]))
## Kind
-(do-template [<declaration>]
+(template [<declaration>]
[(abstract: #export <declaration> {} Any)]
[Literal']
@@ -62,7 +62,7 @@
Text
## SQL
- (do-template [<declaration> <kind>]
+ (template [<declaration> <kind>]
[(type: #export <declaration> (SQL <kind>))]
[Literal (Value' Literal')]
@@ -135,7 +135,7 @@
(..parenthesize (..enumerate parameters)))))
## Condition
- (do-template [<name> <sql-op>]
+ (template [<name> <sql-op>]
[(def: #export (<name> reference sample)
(-> Value Value Condition)
(:abstraction
@@ -170,7 +170,7 @@
" IN "
(..parenthesize (enumerate options)))))
- (do-template [<func-name> <sql-op>]
+ (template [<func-name> <sql-op>]
[(def: #export (<func-name> left right)
(-> Condition Condition Condition)
(:abstraction
@@ -182,7 +182,7 @@
[or "OR"]
)
- (do-template [<name> <type> <sql>]
+ (template [<name> <type> <sql>]
[(def: #export <name>
(-> <type> Condition)
(|>> :representation ..parenthesize (format <sql> " ") :abstraction))]
@@ -192,7 +192,7 @@
)
## Query
- (do-template [<name> <type> <decoration>]
+ (template [<name> <type> <decoration>]
[(def: #export <name>
(-> <type> Source)
(|>> :representation <decoration> :abstraction))]
@@ -202,7 +202,7 @@
[from-query Any-Query ..parenthesize]
)
- (do-template [<func-name> <op>]
+ (template [<func-name> <op>]
[(def: #export (<func-name> columns source)
(-> (List [Column Alias]) Source Base-Query)
(:abstraction
@@ -226,7 +226,7 @@
[select-distinct "SELECT DISTINCT"]
)
- (do-template [<name> <join-text>]
+ (template [<name> <join-text>]
[(def: #export (<name> table condition prev)
(-> Table Condition Base-Query Base-Query)
(:abstraction
@@ -241,7 +241,7 @@
[full-outer-join "FULL OUTER JOIN"]
)
- (do-template [<function> <sql-op>]
+ (template [<function> <sql-op>]
[(def: #export (<function> left right)
(-> Any-Query Any-Query (Query Without-Where Without-Having No-Order No-Group No-Limit No-Offset))
(:abstraction
@@ -254,7 +254,7 @@
[intersect "INTERSECT"]
)
- (do-template [<name> <sql> <variables> <input> <output>]
+ (template [<name> <sql> <variables> <input> <output>]
[(def: #export (<name> value query)
(All <variables>
(-> Nat <input> <output>))
@@ -272,7 +272,7 @@
(Query where having order group limit With-Offset)]
)
- (do-template [<name> <sql>]
+ (template [<name> <sql>]
[(def: #export <name>
Order
(:abstraction <sql>))]
@@ -365,7 +365,7 @@
(-> Text (Schema Value))
(|>> :abstraction))
- (do-template [<name> <attr>]
+ (template [<name> <attr>]
[(def: #export (<name> attr)
(-> (Schema Value) (Schema Value))
(:abstraction
@@ -405,7 +405,7 @@
(:abstraction
(format "CREATE TABLE " (:representation table) " AS " (:representation query))))
- (do-template [<name> <sql>]
+ (template [<name> <sql>]
[(def: #export (<name> table)
(-> Table Definition)
(:abstraction
@@ -425,7 +425,7 @@
(:abstraction
(format "ALTER TABLE " (:representation table) " DROP COLUMN " (:representation column))))
- (do-template [<name> <type>]
+ (template [<name> <type>]
[(def: #export (<name> name)
(-> Text <type>)
(:abstraction name))]
@@ -437,7 +437,7 @@
[db DB]
)
- (do-template [<name> <type> <sql>]
+ (template [<name> <type> <sql>]
[(def: #export <name>
(-> <type> Definition)
(|>> :representation (format <sql> " ") :abstraction))]
@@ -447,7 +447,7 @@
[drop-view View "DROP VIEW"]
)
- (do-template [<name> <sql>]
+ (template [<name> <sql>]
[(def: #export (<name> view query)
(-> View Any-Query Definition)
(:abstraction