You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -83,15 +87,16 @@ The query creation and usage is exactly the same as honeysql.
83
87
(where [:<>:d.zipcode"21201"])))
84
88
(psqlh/returning:d.*)
85
89
sql/format)
86
-
=> ["INSERT INTO distributors AS d (did, dname) VALUES (5, ?), (6, ?) ON CONFLICT (did) DO UPDATE SET dname = EXCLUDED.dname WHERE d.zipcode <> ? RETURNING d.*""Gizmo Transglobal""Associated Computing, Inc""21201"]
90
+
=> ["INSERT INTO distributors AS d (did, dname) VALUES (?, ?), (?, ?) ON CONFLICT (did) DO UPDATE SET dname = EXCLUDED.dname WHERE d.zipcode <> ? RETURNING d.*"
You can make use of `over` to write window functions where it takes in vectors with aggregator functions and window functions along with optional alias like `(over [aggregator-function window-function alias])`, the can be coupled with the `window` clause to write window-function functions with alias that is later defines the window-function, like `(-> (over [aggregator-function :w]) (window :w window-function))`.
@@ -120,7 +125,8 @@ You can make use of `over` to write window functions where it takes in vectors w
120
125
[:date_prod:date]
121
126
[:kind (sql/call:varchar10)]])
122
127
sql/format)
123
-
=> ["CREATE TABLE films (code char(5) CONSTRAINT firstkey PRIMARY KEY, title varchar(40) NOT NULL, did integer NOT NULL, date_prod date, kind varchar(10))"]
128
+
=> ["CREATE TABLE films (code char(?) CONSTRAINT firstkey PRIMARY KEY, title varchar(?) NOT NULL, did integer NOT NULL, date_prod date, kind varchar(?))"
129
+
54010]
124
130
```
125
131
126
132
### drop table
@@ -147,17 +153,16 @@ use `alter-table` along with `add-column` & `drop-column` to modify table level
147
153
### create-extension
148
154
`create-extension` can be used to create extensions with a given keyword.
0 commit comments