[Git][clojure-team/honeysql-clojure][upstream] New upstream version 2.3.911

Jérôme Charaoui (@lavamind) gitlab at salsa.debian.org
Thu Jan 12 16:00:41 GMT 2023



Jérôme Charaoui pushed to branch upstream at Debian Clojure Maintainers / honeysql-clojure


Commits:
a3723884 by Jérôme Charaoui at 2023-01-12T10:18:29-05:00
New upstream version 2.3.911
- - - - -


16 changed files:

- CHANGELOG.md
- README.md
- build.clj
- doc/clause-reference.md
- doc/differences-from-1-x.md
- doc/extending-honeysql.md
- doc/getting-started.md
- doc/options.md
- doc/postgresql.md
- doc/special-syntax.md
- src/honey/sql.cljc
- src/honey/sql/helpers.cljc
- − src/honey/sql/protocols.cljc
- test/honey/sql/helpers_test.cljc
- test/honey/sql/postgres_test.cljc
- test/honey/sql_test.cljc


Changes:

=====================================
CHANGELOG.md
=====================================
@@ -1,32 +1,5 @@
 # Changes
 
-* 2.4.962 -- 2022-12-17
-  * Fix `set-options!` (only `:checking` worked in 2.4.947).
-  * Fix `:cast` formatting when quoting is enabled, via PR [#443](https://github.com/seancorfield/honeysql/pull/443) [duddlf23](https://github.com/duddlf23).
-  * Fix [#441](https://github.com/seancorfield/honeysql/issues/441) by adding `:replace-into` to in-flight clause order (as well as registering it for the `:mysql` dialect).
-  * Fix [#434](https://github.com/seancorfield/honeysql/issues/434) by special-casing `:'ARRAY`.
-  * Fix [#433](https://github.com/seancorfield/honeysql/issues/433) by supporting additional `WITH` syntax, via PR [#432](https://github.com/seancorfield/honeysql/issues/432), [@MawiraIke](https://github.com/MawiraIke). _[Technically, this was in 2.4.947, but I kept the issue open while I wordsmithed the documentation]_
-  * Address [#405](https://github.com/seancorfield/honeysql/issues/405) by adding `:numbered` option, which can also be set globally using `set-options!`.
-
-* 2.4.947 -- 2022-11-05
-  * Fix [#439](https://github.com/seancorfield/honeysql/issues/439) by rewriting how DDL options are processed; also fixes [#386](https://github.com/seancorfield/honeysql/issues/386) and [#437](https://github.com/seancorfield/honeysql/issues/437); **Whilst this is intended to be purely a bug fix, it has the potential to be a breaking change -- hence the version jump to 2.4!**
-  * Fix [#438](https://github.com/seancorfield/honeysql/issues/438) by
-  supporting options on `TRUNCATE`.
-  * Address [#435](https://github.com/seancorfield/honeysql/issues/435) by showing `CREATE TEMP TABLE` etc.
-  * Fix [#431](https://github.com/seancorfield/honeysql/issues/431) -- `WHERE false` differed between the DSL and the `where` helper.
-  * Address [#430](https://github.com/seancorfield/honeysql/issues/430) by treating `:'` as introducing a name that should be treated literally and not formatted as a SQL entity (which respects quoting, dot-splitting, etc); this effectively expands the "escape hatch" introduced via [#352](https://github.com/seancorfield/honeysql/issues/352) in 2.2.868. _Note that the function context behavior formats as a SQL entity, rather than the usual SQL "keyword", whereas this new context is a literal transcription rather than as a SQL entity!_
-  * Address [#427](https://github.com/seancorfield/honeysql/issues/427) by adding `set-options!`.
-  * Address [#415](https://github.com/seancorfield/honeysql/issues/415) by supporting multiple column names in `ADD COLUMN`, `ALTER COLUMN`, `DROP COLUMN`, and `MODIFY COLUMN`.
-
-* 2.3.928 -- 2022-09-04
-  * Address [#425](https://github.com/seancorfield/honeysql/issues/425) by clarifying that `INTERVAL` as special syntax may be MySQL-specific and PostgreSQL uses difference syntax (because `INTERVAL` is a data type there).
-  * Address [#423](https://github.com/seancorfield/honeysql/issues/423) by supporting `DEFAULT` values and `DEFAULT` rows in `VALUES`.
-  * Address [#422](https://github.com/seancorfield/honeysql/issues/422) by auto-quoting unusual entity names when `:quoted` (and `:dialect`) are not specified, making HoneySQL more secure by default.
-  * Fix [#421](https://github.com/seancorfield/honeysql/issues/421) by adding `:replace-into` for `:mysql` dialect.
-  * Address [#419](https://github.com/seancorfield/honeysql/issues/419) by adding `honey.sql.protocols` and `InlineValue` with a `sqlize` function.
-  * Address [#413](https://github.com/seancorfield/honeysql/issues/413) by flagging a lack of `WHERE` clause for `DELETE`, `DELETE FROM`, and `UPDATE` when `:checking :basic` (or `:checking :strict`).
-  * Fix [#392](https://github.com/seancorfield/honeysql/issues/392) by adding support for `WITH` / (`NOT`) `MATERIALIZED` -- via PR [#420](https://github.com/seancorfield/honeysql/issues/420) [@robhanlon22](https://github.com/robhanlon22).
-
 * 2.3.911 -- 2022-07-29
   * Address [#418](https://github.com/seancorfield/honeysql/issues/418) by documenting a potential "gotcha" with multi-column `IN` expressions (a change from HoneySQL 1.x).
   * Fix [#416](https://github.com/seancorfield/honeysql/issues/416) via PR [#417](https://github.com/seancorfield/honeysql/issues/417) from [@corasaurus-hex](https://github.com/corasaurus-hex) -- using the internal default state for the integrity assertion.
@@ -52,7 +25,7 @@
 * 2.2.868 -- 2022-02-21
   * Address [#387](https://github.com/seancorfield/honeysql/issues/387) by making the function simpler.
   * Fix [#385](https://github.com/seancorfield/honeysql/issues/385) by quoting inlined UUIDs.
-  * Address [#352](https://github.com/seancorfield/honeysql/issues/352) by treating `:'` as introducing a function name that should be formatted as a SQL entity (which respects quoting, dot-splitting, etc), rather than as a SQL "keyword".
+  * Address [#352](https://github.com/seancorfield/honeysql/issues/352) by treating `:'` as introducing a function name that should be formatted as a SQL entity (respects quoting, dot-splitting, etc).
 
 * 2.2.861 -- 2022-01-30
   * Address [#382](https://github.com/seancorfield/honeysql/issues/382) by adding `:case-expr` for BigQuery support.


=====================================
README.md
=====================================
@@ -4,7 +4,7 @@ SQL as Clojure data structures. Build queries programmatically -- even at runtim
 
 ## Build
 
-[![Clojars Project](https://clojars.org/com.github.seancorfield/honeysql/latest-version.svg)](https://clojars.org/com.github.seancorfield/honeysql) [![cljdoc badge](https://cljdoc.org/badge/com.github.seancorfield/honeysql?2.4.962)](https://cljdoc.org/d/com.github.seancorfield/honeysql/CURRENT)
+[![Clojars Project](https://clojars.org/com.github.seancorfield/honeysql/latest-version.svg)](https://clojars.org/com.github.seancorfield/honeysql) [![cljdoc badge](https://cljdoc.org/badge/com.github.seancorfield/honeysql?2.3.911)](https://cljdoc.org/d/com.github.seancorfield/honeysql/CURRENT)
 
 This project follows the version scheme MAJOR.MINOR.COMMITS where MAJOR and MINOR provide some relative indication of the size of the change, but do not follow semantic versioning. In general, all changes endeavor to be non-breaking (by moving to new names rather than by breaking existing names). COMMITS is an ever-increasing counter of commits since the beginning of this repository.
 
@@ -116,13 +116,6 @@ If you want to format the query as a string with no parameters (e.g. to use the
 => ["SELECT a, b, c FROM foo WHERE foo.a = 'baz'"]
 ```
 
-As seen above, the default parameterization uses positional parameters (`?`) with the order of values in the generated vector matching the order of those placeholders in the SQL. As of 2.4.962, you can specified `:numbered true` as an option to produce numbered parameters (`$1`, `$2`, etc):
-
-```clojure
-(sql/format sqlmap {:numbered true})
-=> ["SELECT a, b, c FROM foo WHERE foo.a = $1" "baz"]
-```
-
 Namespace-qualified keywords (and symbols) are generally treated as table-qualified columns: `:foo/bar` becomes `foo.bar`, except in contexts where that would be illegal (such as the list of columns in an `INSERT` statement). This approach is likely to be more compatible with code that uses libraries like [`next.jdbc`](https://github.com/seancorfield/next-jdbc) and [`seql`](https://github.com/exoscale/seql), as well as being more convenient in a world of namespace-qualified keywords, following the example of `clojure.spec` etc.
 
 ```clojure
@@ -395,19 +388,6 @@ INSERT INTO comp_table
 VALUES (?, (?, ?)), (?, (?, ?))
 "
 "small" 1 "inch" "large" 10 "feet"]
-;; with numbered parameters:
-(-> (insert-into :comp_table)
-    (columns :name :comp_column)
-    (values
-     [["small" (composite 1 "inch")]
-      ["large" (composite 10 "feet")]])
-    (sql/format {:pretty true :numbered true}))
-=> ["
-INSERT INTO comp_table
-(name, comp_column)
-VALUES ($1, ($2, $3)), ($4, ($5, $6))
-"
-"small" 1 "inch" "large" 10 "feet"]
 ;; or as pure data DSL:
 (-> {:insert-into [:comp_table],
      :columns [:name :comp_column],
@@ -550,8 +530,6 @@ vectors where the first element is either a keyword or a symbol:
 => ["SELECT * FROM foo WHERE date_created > DATE_ADD(NOW(), INTERVAL ? HOURS)" 24]
 ```
 
-> Note: The above example may be specific to MySQL but the general principle of vectors for function calls applies to all dialects.
-
 A shorthand syntax also exists for simple function calls:
 keywords that begin with `%` are interpreted as SQL function calls:
 
@@ -616,8 +594,6 @@ unless you have quoting enabled:
 => ["SELECT * FROM `foo` WHERE `my-schema`.`SomeFunction`(`bar`, ?)" 0]
 ```
 
-> Note: in non-function contexts, if a keyword begins with `'`, it is transcribed into the SQL exactly as-is, with no case or character conversion at all.
-
 ### Bindable parameters
 
 Keywords that begin with `?` are interpreted as bindable parameters:
@@ -628,12 +604,6 @@ Keywords that begin with `?` are interpreted as bindable parameters:
     (where [:= :a :?baz])
     (sql/format {:params {:baz "BAZ"}}))
 => ["SELECT id FROM foo WHERE a = ?" "BAZ"]
-;; or with numbered parameters:
-(-> (select :id)
-    (from :foo)
-    (where [:= :a :?baz])
-    (sql/format {:params {:baz "BAZ"} :numbered true}))
-=> ["SELECT id FROM foo WHERE a = $1" "BAZ"]
 ;; or as pure data DSL:
 (-> {:select [:id], :from [:foo], :where [:= :a :?baz]}
     (sql/format {:params {:baz "BAZ"}}))
@@ -728,16 +698,16 @@ have a lot of function calls needed in code:
     (sql/format {:pretty true}))
 => ["
 INSERT INTO sample
-(location) VALUES (ST_SETSRID(ST_MAKEPOINT(?, ?), CAST(? AS INTEGER)))
+(location) VALUES (ST_SETSRID(ST_MAKEPOINT(?, ?), CAST(? AS integer)))
 "
 0.291 32.621 4325]
 ```
 
-#### Entity Names
+#### Identifiers
 
-To quote SQL entity names, pass the `:quoted true` option to `format` and they will
+To quote identifiers, pass the `:quoted true` option to `format` and they will
 be quoted according to the selected dialect. If you override the dialect in a
-`format` call, by passing the `:dialect` option, SQL entity names will be automatically
+`format` call, by passing the `:dialect` option, identifiers will be automatically
 quoted. You can override the dialect and turn off quoting by passing `:quoted false`.
 Valid `:dialect` options are `:ansi` (the default, use this for PostgreSQL),
 `:mysql`, `:oracle`, or `:sqlserver`:
@@ -858,24 +828,6 @@ LIMIT ?
 OFFSET ?
 "
 "bort" "gabba" 1 2 2 3 1 2 3 10 20 0 50 10]
-;; with numbered parameters:
-(sql/format big-complicated-map
-            {:params {:param1 "gabba" :param2 2}
-             :pretty true :numbered true})
-=> ["
-SELECT DISTINCT f.*, b.baz, c.quux, b.bla AS \"bla-bla\", NOW(), @x := 10
-FROM foo AS f, baz AS b
-INNER JOIN draq ON f.b = draq.x INNER JOIN eldr ON f.e = eldr.t
-LEFT JOIN clod AS c ON f.a = c.d
-RIGHT JOIN bock ON bock.z = c.e
-WHERE ((f.a = $1) AND (b.baz <> $2)) OR (($3 < $4) AND ($5 < $6)) OR (f.e IN ($7, $8, $9)) OR f.e BETWEEN $10 AND $11
-GROUP BY f.a, c.e
-HAVING $12 < f.e
-ORDER BY b.baz DESC, c.quux ASC, f.a NULLS FIRST
-LIMIT $13
-OFFSET $14
-"
-"bort" "gabba" 1 2 2 3 1 2 3 10 20 0 50 10]
 ```
 ```clojure
 ;; Printable and readable
@@ -926,13 +878,8 @@ Or perhaps your database supports syntax like `a BETWIXT b AND c`, in which case
 ;; example usage:
 (-> (select :a) (where [:betwixt :a 1 10]) sql/format)
 => ["SELECT a WHERE a BETWIXT ? AND ?" 1 10]
-;; with numbered parameters:
-(-> (select :a) (where [:betwixt :a 1 10]) (sql/format {:numbered true}))
-=> ["SELECT a WHERE a BETWIXT $1 AND $2" 1 10]
 ```
 
-> Note: the generation of positional placeholders (`?`) or numbered placeholders (`$1`, `$2`, etc) is handled automatically by `format-expr` so you get this behavior "for free" in your extensions, as long as you use the public API for `honey.sql`. You should avoid writing extensions that generate placeholders directly if you want them to work with numbered parameters.
-
 You can also register SQL clauses, specifying the keyword, the formatting function, and an existing clause that this new clause should be processed before:
 
 ```clojure
@@ -958,6 +905,6 @@ If you find yourself registering an operator, a function (syntax), or a new clau
 
 ## License
 
-Copyright (c) 2020-2022 Sean Corfield. HoneySQL 1.x was copyright (c) 2012-2020 Justin Kramer and Sean Corfield.
+Copyright (c) 2020-2021 Sean Corfield. HoneySQL 1.x was copyright (c) 2012-2020 Justin Kramer and Sean Corfield.
 
 Distributed under the Eclipse Public License, the same as Clojure.


=====================================
build.clj
=====================================
@@ -17,7 +17,7 @@
             [org.corfield.build :as bb]))
 
 (def lib 'com.github.seancorfield/honeysql)
-(defn- the-version [patch] (format "2.4.%s" patch))
+(defn- the-version [patch] (format "2.3.%s" patch))
 (def version (the-version (b/git-count-revs nil)))
 (def snapshot (the-version "999-SNAPSHOT"))
 


=====================================
doc/clause-reference.md
=====================================
@@ -85,8 +85,7 @@ user=> (sql/format {:alter-table [:fruit
 
 As can be seen above, `:add-column` and `:alter-column`
 both accept a column description (as a sequence of simple
-expressions); `:drop-column` accepts one or more column names
-optionally prefixed by `:if-exists`,
+expressions); `:drop-column` accepts a single column name,
 and `:rename-column` accepts a sequence with two column
 names: the "from" and the "to" names.
 
@@ -133,9 +132,10 @@ user=> (sql/format {:alter-table :fruit :rename-table :vegetable})
 
 ## create-table, with-columns
 
-`:create-table` can accept a single table name or a sequence
+`:create-table` can accept a single table name or a pair
 containing a table name and a flag indicating the creation
-should be conditional (`:if-not-exists` or the symbol `if-not-exists`). `:create-table` should
+should be conditional (`:if-not-exists` or the symbol `if-not-exists`,
+although any truthy value will work). `:create-table` should
 be used with `:with-columns` to specify the actual columns
 in the table:
 
@@ -148,30 +148,11 @@ user=> (sql/format {:create-table :fruit
 ["CREATE TABLE fruit (id INT NOT NULL, name VARCHAR(32) NOT NULL, cost FLOAT NULL)"]
 ```
 
-Any keywords (or symbols) preceding the table name will be
-turned into SQL keywords (this is true for all of the `create-*`
-DSL identifiers):
-
-```clojure
-user=> (sql/format {:create-table [:my :fancy :fruit :if-not-exists]
-                    :with-columns
-                    [[:id :int [:not nil]]
-                     [:name [:varchar 32] [:not nil]]
-                     [:cost :float :null]]})
-["CREATE MY FANCY TABLE IF NOT EXISTS fruit (id INT NOT NULL, name VARCHAR(32) NOT NULL, cost FLOAT NULL)"]
-```
-
-This lets you write SQL like `CREATE TEMP TABLE foo ...` etc.
-
 The `:with-columns` clause is formatted as if `{:inline true}`
 was specified so nothing is parameterized. In addition,
 everything except the first element of a column description
 will be uppercased (mostly to give the appearance of separating
-the column name from the SQL keywords) -- except for keywords
-that with `'` which will be transcribed into the SQL exactly
-as-is, with no case or character conversion at all. This
-"escape hatch" is intended to allow for SQL dialects that are
-case sensitive and/or have other unusual syntax constraints.
+the column name from the SQL keywords).
 
 Various function-like expressions can be specified, as shown
 in the example above, that allow things like `CHECK` for a
@@ -230,20 +211,10 @@ WITH NO DATA
 " "y"]
 ```
 
-As above, any keywords (or symbols) preceding the table name
-will be turned into SQL keywords (this is true for all of the
-`create-*` DSL identifiers) so you can write:
-
-```
-{:create-table-as [:temp :metro :if-not-exists [..]] ..}
-```
-
-to produce `CREATE TEMP TABLE IF NOT EXISTS metro ..`.
-
 ## create-extension
 
-`:create-extension` can accept a single extension name or a
-sequence of the extension name, followed by
+`:create-extension` can accept a single extension name or a pair
+of the extension name, followed by
 a flag indicating the creation should be conditional
 (`:if-not-exists` or the symbol `if-not-exists`).
 See the [PostgreSQL](postgresql.md) section for examples.
@@ -319,11 +290,9 @@ order they would appear in a valid SQL statement).
 
 ## with, with-recursive
 
-These provide CTE support for several databases.
-In the most common form, the argument to
+These provide CTE support for SQL Server. The argument to
 `:with` (or `:with-recursive`) is a sequences of pairs, each of
-a result set name (or description) and either of; a basic SQL
-statement, a string, a keyword or a symbol.
+a result set name (or description) and a basic SQL statement.
 The result set can either be a SQL entity (a simple name)
 or a pair of a SQL entity and a set of column names.
 
@@ -336,34 +305,6 @@ user=> (sql/format '{with ((stuff {select (:*) from (foo)}),
 ["WITH stuff AS (SELECT * FROM foo), nonsense AS (SELECT * FROM bar) SELECT foo.id, bar.name FROM stuff, nonsense WHERE status = ?" 0]
 ```
 
-When the expression is a basic SQL statement in any of the pairs,
-the resulting syntax of the pair is `WITH ident AS expr` as shown above.
-However, when the expression is a string, a keyword or a symbol, the resulting
-syntax of the pair is of the form `WITH expr AS ident` like this:
-
-```clojure
-user=> (sql/format '{with ((ts_upper_bound "2019-08-01 15:23:00"))
-                     select :*
-                     from (hits)
-                     where (= EventDate ts_upper_bound)})
-["WITH ? AS ts_upper_bound SELECT * FROM hits WHERE EventDate = ts_upper_bound" "2019-08-01 15:23:00"]
-```
-
-The syntax only varies for each pair and so you can use both SQL statements
-and keywords/strings/symbols in the same `WITH` clause like this:
-
-```clojure
-user=> (sql/format '{with   ((ts_upper_bound "2019-08-01 15:23:00")
-                             (review :awesome)
-                             (stuff {select (:*) from (songs)}))
-                     select :*
-                     from   (hits, stuff)
-                     where  (and (= EventDate ts_upper_bound)
-                                 (= EventReview review))})
-["WITH ? AS ts_upper_bound, awesome AS review, stuff AS (SELECT * FROM songs) SELECT * FROM hits, stuff WHERE (EventDate = ts_upper_bound) AND (EventReview = review)"
- "2019-08-01 15:23:00"]
-```
-
 You can specify a list of columns for the CTE like this:
 
 ```clojure
@@ -498,7 +439,7 @@ user=> (sql/format '{select * bulk-collect-into [arrv 100] from mytable})
 ["SELECT * BULK COLLECT INTO arrv LIMIT ? FROM mytable" 100]
 ```
 
-## insert-into, replace-into
+## insert-into
 
 There are three use cases with `:insert-into`.
 
@@ -516,9 +457,6 @@ or a table/column specifier and a SQL query.
 For the first and second cases, you'll use the `:values` clause
 to specify rows of values to insert.
 
-`:replace-into` is part of the `:mysql` dialect that produces a `REPLACE INTO`
-statement but otherwise has identical syntax to `:insert-into`.
-
 ```clojure
 ;; first case -- table specifier:
 user=> (sql/format {:insert-into :transport
@@ -591,14 +529,11 @@ user=> (sql/format {:delete [:order :item]
 
 ## truncate
 
-`:truncate` accepts a simple SQL entity (table name)
-or a table name followed by various options:
+`:truncate` accepts a simple SQL entity (table name):
 
 ```clojure
 user=> (sql/format '{truncate transport})
 ["TRUNCATE transport"]
-user=> (sql/format '{truncate (transport restart identity)})
-["TRUNCATE transport RESTART IDENTITY"]
 ```
 
 ## columns
@@ -977,7 +912,6 @@ In the former case, all of the rows are augmented to have
 either `NULL` or `DEFAULT` values for any missing keys (columns).
 By default, `NULL` is used but you can specify a set of columns
 to get `DEFAULT` values, via the `:values-default-columns` option.
-You can also be explicit and use `[:default]` as a value to generate `DEFAULT`.
 In the latter case -- a sequence of sequences --
 all of the rows are padded to the same length by adding `nil`
 values if needed (since `:values` does not know how or if column
@@ -1002,32 +936,6 @@ user=> (sql/format '{insert-into table
 
 > Note: the `:values-default-columns` option must match how the columns are specified, i.e., as symbols or keywords.
 
-For databases that allow it, you can insert an entire row of default values,
-if appropriate, using one of the following syntaxes:
-
-```clojure
-user=> (sql/format {:insert-into :table :values []})
-["INSERT INTO table VALUES ()"]
-user=> (sql/format {:insert-into :table :values :default})
-["INSERT INTO table DEFAULT VALUES"]
-```
-
-Some databases support the empty `VALUES` clause, some support `DEFAULT VALUES`, some support neither. Consult your database's documentation to see which approach to use.
-
-For databases that allow it, when specifying multiple rows you use `:default` in
-place of a row to insert default values for that row:
-
-```clojure
-user=> (sql/format {:insert-into :table
-                    :values [{:a 1 :b 2 :c 3}
-                             :default
-                             {:a 4 :b 5 :c 6}]})
-["INSERT INTO table (a, b, c) VALUES (?, ?, ?), DEFAULT, (?, ?, ?)" 6 5 4]
-user=> (sql/format {:insert-into :table
-                    :values [[1 2 3] :default [4 5 6]]})
-["INSERT INTO table VALUES (?, ?, ?), DEFAULT, (?, ?, ?)" 1 2 3 4 5 6]
-```
-
 ## on-conflict, on-constraint, do-nothing, do-update-set
 
 These are grouped together because they are handled


=====================================
doc/differences-from-1-x.md
=====================================
@@ -63,7 +63,7 @@ Supported Clojure versions: 1.7 and later.
 In `deps.edn`:
 <!-- :test-doc-blocks/skip -->
 ```clojure
-com.github.seancorfield/honeysql {:mvn/version "2.4.962"}
+com.github.seancorfield/honeysql {:mvn/version "2.3.911"}
 ```
 
 Required as:
@@ -104,15 +104,15 @@ You can now select a non-ANSI dialect of SQL using the new `honey.sql/set-dialec
 
 ## Option Changes
 
-The `:quoting <dialect>` option has been superseded by the new dialect machinery and a new `:quoted` option that turns quoting on or off. You either use `:dialect <dialect>` instead (which turns on quoting by default) or set a default dialect (via `set-dialect!`) and then use `:quoted true` in `format` calls where you want quoting.
+The `:quoting <dialect>` option has superseded by the new dialect machinery and a new `:quoted` option that turns quoting on or off. You either use `:dialect <dialect>` instead or set a default dialect (via `set-dialect!`) and then use `:quoted true` in `format` calls where you want quoting..
 
-SQL entity names are automatically quoted if you specify a `:dialect` option to `format`, unless you also specify `:quoted false`.
+Identifiers are automatically quoted if you specify a `:dialect` option to `format`, unless you also specify `:quoted false`.
 
 The following options are no longer supported:
 * `:allow-dashed-names?` -- if you provide dashed-names in 2.x, they will be left as-is if quoting is enabled, else they will be converted to snake_case (so you will either get `"dashed-names"` with quoting or `dashed_names` without). If you want dashed-names to be converted to snake_case when `:quoted true`, you also need to specify `:quoted-snake true`.
 * `:allow-namespaced-names?` -- this supported `foo/bar` column names in SQL which I'd like to discourage.
 * `:namespace-as-table?` -- this is the default in 2.x: `:foo/bar` will be treated as `foo.bar` which is more in keeping with `next.jdbc`.
-* `:parameterizer` -- this would add a lot of complexity to the formatting engine and I do not know how widely it was used (especially in its arbitrarily extensible form). _[As of 2.4.962, the ability to generated SQL with numbered parameters, i.e., `$1` instead of positional parameters, `?`, has been added via the `:numbered true` option]_
+* `:parameterizer` -- this would add a lot of complexity to the formatting engine and I do not know how widely it was used (especially in its arbitrarily extensible form).
 * `:return-param-names` -- this was added to 1.x back in 2013 without an associated issue or PR so I've no idea what use case this was intended to support.
 
 > Note: I expect some push back on those first three options and the associated behavior changes.
@@ -131,7 +131,7 @@ The following new syntax has been added:
 * `:default` -- for `DEFAULT` values (in inserts) and for declaring column defaults in table definitions,
 * `:escape` -- used to wrap a regular expression so that non-standard escape characters can be provided,
 * `:inline` -- used as a function to replace the `sql/inline` / `#sql/inline` machinery,
-* `:interval` -- used as a function to support `INTERVAL <n> <units>`, e.g., `[:interval 30 :days]` for databases that support it (e.g., MySQL),
+* `:interval` -- used as a function to support `INTERVAL <n> <units>`, e.g., `[:interval 30 :days]`,
 * `:lateral` -- used to wrap a statement or expression, to provide a `LATERAL` join,
 * `:lift` -- used as a function to prevent interpretation of a Clojure data structure as DSL syntax (e.g., when passing a vector or hash map as a parameter value) -- this should mostly be a replacement for `honeysql.format/value`,
 * `:nest` -- used as a function to add an extra level of nesting (parentheses) around an expression,


=====================================
doc/extending-honeysql.md
=====================================
@@ -14,23 +14,6 @@ many more. Built in operators include: `:=`, `:+`, `:mod`.
 Built in functions (special syntax) include: `:array`, `:case`,
 `:cast`, `:inline`, `:raw` and many more.
 
-## Extending what `:inline` can do
-
-By default, the `:inline` option can convert a fairly
-basic set of values/types to SQL strings:
-* `nil`
-* strings
-* keywords and symbols
-* vectors
-* UUIDs (Clojure only)
-
-Everything is naively converted by calling `str`.
-
-You can extend `honey.sql.protocols/InlineValue` to
-other types and defining how the `sqlize` function
-should behave. It takes a single argument, the value
-to be inlined (converted to a SQL string).
-
 ## Registering a New Clause Formatter
 
 `honey.sql/register-clause!` accepts a keyword (or a symbol)
@@ -179,10 +162,10 @@ of it and would call `sql/format-expr` on each argument:
 _New in HoneySQL 2.3.x_
 
 The built-in dialects that HoneySQL supports are:
-* `:ansi` -- the default, that quotes SQL entity names with double-quotes, like `"this"`
-* `:mysql` -- quotes SQL entity names with backticks, and changes the precedence of `SET` in `UPDATE`
-* `:oracle` -- quotes SQL entity names like `:ansi`, and does not use `AS` in aliases
-* `:sqlserver` -- quotes SQL entity names with brackets, like `[this]`
+* `:ansi` -- the default, that quotes identifiers with double-quotes, like `"this"`
+* `:mysql` -- quotes identifiers with backticks, and changes the precedence of `SET` in `UPDATE`
+* `:oracle` -- quotes identifiers like `:ansi`, and does not use `AS` in aliases
+* `:sqlserver` -- quotes identifiers with brackets, like `[this]`
 
 A dialect spec is a hash map containing at least `:quote` but also optionally `:clause-order-fn` and/or `:as`:
 * `:quote` -- a unary function that takes a string and returns the quoted version of it


=====================================
doc/getting-started.md
=====================================
@@ -10,14 +10,14 @@ For the Clojure CLI, add the following dependency to your `deps.edn` file:
 
 <!-- :test-doc-blocks/skip -->
 ```clojure
-    com.github.seancorfield/honeysql {:mvn/version "2.4.962"}
+    com.github.seancorfield/honeysql {:mvn/version "2.3.911"}
 ```
 
 For Leiningen, add the following dependency to your `project.clj` file:
 
 <!-- :test-doc-blocks/skip -->
 ```clojure
-    [com.github.seancorfield/honeysql "2.4.962"]
+    [com.github.seancorfield/honeysql "2.3.911"]
 ```
 
 HoneySQL produces SQL statements but does not execute them.
@@ -110,8 +110,6 @@ Some "functions" are considered to be operators. In general,
 `42` and `"c"` lifted out into the overall vector result
 (with a SQL string followed by all its parameters).
 
-> Note: you can use the `:numbered true` option to `format` to produce SQL containing numbered placeholders, like `FOO(a, $1, $2)`, instead of positional placeholders (`?`).
-
 Operators can be strictly binary or variadic (most are strictly binary).
 Special syntax can have zero or more arguments and each form is
 described in the [Special Syntax](special-syntax.md) section.
@@ -181,7 +179,7 @@ expression requires an extra level of nesting:
 
 As indicated in the preceding sections, values found in the DSL data structure
 that are not keywords or symbols are lifted out as positional parameters..
-By default, they are replaced by `?` in the generated SQL string and added to the
+They are replaced by `?` in the generated SQL string and added to the
 parameter list in order:
 
 <!-- :test-doc-blocks/skip -->
@@ -189,14 +187,6 @@ parameter list in order:
 [:between :size 10 20] ;=> "size BETWEEN ? AND ?" with parameters 10 and 20
 ```
 
-If you specify the `:numbered true` option to `format`, numbered placeholders (`$1`, `$2`, etc) will be used instead of positional placeholders (`?`).
-
-<!-- :test-doc-blocks/skip -->
-```clojure
-;; with :numbered true option:
-[:between :size 10 20] ;=> "size BETWEEN $1 AND $2" with parameters 10 and 20
-```
-
 HoneySQL also supports named parameters. There are two ways
 of identifying a named parameter:
 * a keyword or symbol that begins with `?`
@@ -216,18 +206,6 @@ call as the `:params` key of the options hash map.
 ;;=> ["SELECT * FROM table WHERE a = ?" 42]
 ```
 
-Or with `:numbered true`:
-```clojure
-(sql/format {:select [:*] :from [:table]
-             :where [:= :a :?x]}
-            {:params {:x 42} :numbered true})
-;;=> ["SELECT * FROM table WHERE a = $1" 42]
-(sql/format {:select [:*] :from [:table]
-             :where [:= :a [:param :x]]}
-            {:params {:x 42} :numbered true})
-;;=> ["SELECT * FROM table WHERE a = $1" 42]
-```
-
 ## Functional Helpers
 
 In addition to the hash map (and sequences) approach of building
@@ -320,8 +298,6 @@ Most databases use `"` for quoting (the `:ansi` and `:oracle` dialects).
 The `:sqlserver` dialect uses `[`..`]` and the `:mysql` dialect uses
 ```..```. In addition, the `:oracle` dialect disables `AS` in aliases.
 
-> Note: by default, quoting is **off** which produces cleaner-looking SQL and assumes you control all the symbols/keywords used as table, column, and function names -- the "SQL entities". If you are building any SQL or DDL where the table, column, or function names could be provided by an external source, **you should specify `:quoted true` to ensure all SQL entities are safely quoted**. As of 2.3.928, if you do _not_ specify `:quoted` as an option, HoneySQL will automatically quote any SQL entities that seem unusual, i.e., that contain any characters that are not alphanumeric or underscore. Purely alphanumeric entities will not be quoted (no entities were quoted by default prior to 2.3.928). You can prevent that auto-quoting by explicitly passing `:quoted false` into the `format` call but, from a security point of view, you should think very carefully before you do that: quoting entity names helps protect you from injection attacks! As of 2.4.947, you can change the default setting of `:quoted` from `nil` to `true` (or `false`) via the `set-options!` function.
-
 Currently, the only dialect that has substantive differences from
 the others is `:mysql` for which the `:set` clause
 has a different precedence than ANSI SQL.
@@ -333,11 +309,10 @@ before you call `format` for the first time.
 You can change the dialect for a single `format` call by
 specifying the `:dialect` option in that call.
 
-Alphanumeric SQL entities are not quoted by default but if you specify the
+SQL entities are not quoted by default but if you specify the
 dialect in a `format` call, they will be quoted. If you don't
 specify a dialect in the `format` call, you can specify
-`:quoted true` to have SQL entities quoted. You can also enable quoting
-globally via the `set-dialect!` function.
+`:quoted true` to have SQL entities quoted.
 
 <!-- Reminder to doc author:
      Reset dialect to default so other blocks are not affected for test-doc-blocks -->
@@ -361,8 +336,6 @@ globally via the `set-dialect!` function.
 ;; and reset back to the default of :ansi
 (sql/set-dialect! :ansi)
 ;;=> nil
-;; which also resets the quoting default (back to nil)
-;; so only unusual entity names get quoted:
 (sql/format '{select (id) from (table)} {:quoted true})
 ;;=> ["SELECT \"id\" FROM \"table\""]
 ```


=====================================
doc/options.md
=====================================
@@ -19,24 +19,11 @@ All options may be omitted. The default behavior of each option is described in
 * `:checking` -- `:none` (default), `:basic`, or `:strict` to control the amount of lint-like checking that HoneySQL performs,
 * `:dialect` -- a keyword that identifies a dialect to be used for this specific call to `format`; the default is to use what was specified in `set-dialect!` or `:ansi` if no other dialect has been set,
 * `:inline` -- a Boolean indicating whether or not to inline parameter values, rather than use `?` placeholders and a sequence of parameter values; the default is `false` -- values are not inlined,
-* `:numbered` -- a Boolean indicating whether to generate numbered placeholders in the generated SQL (`$1`, `$2`, etc) or positional placeholders (`?`); the default is `false` (positional placeholders); this option was added in 2.4.962,
 * `:params` -- a hash map providing values for named parameters, identified by names (keywords or symbols) that start with `?` in the DSL; the default is that any such named parameters will have `nil` values,
-* `:quoted` -- a Boolean indicating whether or not to quote (strop) SQL entity names (table and column names); the default is `nil` -- alphanumeric SQL entity names are not quoted but (as of 2.3.928) "unusual" SQL entity names are quoted; a `false` value turns off all quoting,
-* `:quoted-snake` -- a Boolean indicating whether or not quoted and string SQL entity names should have `-` replaced by `_`; the default is `false` -- quoted and string SQL entity names are left exactly as-is,
+* `:quoted` -- a Boolean indicating whether or not to quote (strop) identifiers (table and column names); the default is `false` -- identifiers are not quoted,
+* `:quoted-snake` -- a Boolean indicating whether or not quoted and string identifiers should have `-` replaced by `_`; the default is `false` -- quoted and string identifiers are left exactly as-is,
 * `:values-default-columns` -- a sequence of column names that should have `DEFAULT` values instead of `NULL` values if used in a `VALUES` clause with no associated matching value in the hash maps passed in; the default behavior is for such missing columns to be given `NULL` values.
 
-As of 2.4.947, you can call `set-options!` with an options hash map to change the
-global defaults of certain options:
-
-* `:checking` -- can be `:basic` or `:strict`; specify `:none` to reset to the default,
-* `:inline` -- can be `true` but consider the security issues this causes by not using parameterized SQL statements; specify `false` (or `nil`) to reset to the default,
-* `:numbered` -- can be `true` or `false`; specify `false` to reset to the default,
-* `:quoted` -- can be `true` or `false`; specify `nil` to reset to the default; calling `set-dialect!` or providing a `:dialect` option to `format` will override the global default,
-* `:quoted-snake` -- can be `true`; specify `false` (or `nil`) to reset to the default.
-
-Other options may only be specified directly in calls to `format` as they are considered
-per-statement, rather than global.
-
 See below for the interaction between `:dialect` and `:quoted`.
 
 ## `:cache`
@@ -55,18 +42,15 @@ Added in 2.2.858.
 
 ## `:checking`
 
-The `:checking` option defaults to `:none`.
-If `:checking :basic` is specified, certain obvious errors
-are treated as an error and an exception is thrown.
-If `:checking :strict` is specified, certain dubious constructs are also treated as an error and an exception is
-thrown.
-It is expected that this feature will be expanded over time
+The `:checking` option defaults to `:none`. If `:checking :basic` is
+specified, certain obvious errors -- such as `IN` with an empty collection
+or `SELECT` with an empty list of columns --
+are treated as an error and an exception is thrown. If `:checking :strict`
+is specified, certain dubious constructs -- such as `IN` with a collection
+containing `NULL` values -- are also treated as an error and an exception is
+thrown. It is expected that this feature will be expanded over time
 to help avoid generating illegal SQL.
 
-Here are the checks for each level:
-* `:basic` -- `DELETE` and `DELETE FROM` without a `WHERE` clause; `IN` with an empty collection; `SELECT` with an empty list of columns; `UPDATE` without a `WHERE` clause.
-* `:strict` -- (all the `:basic` checks plus) `IN` with a collection containing `NULL` values (since this will not match rows).
-
 ## `:dialect`
 
 If `:dialect` is provided, `:quoted` will default to `true` for this call. You can still specify `:quoted false` to turn that back off.
@@ -96,15 +80,6 @@ was wrapped in `[:inline `..`]`:
 * keywords and symbols become SQL keywords (uppercase, with `-` replaced by a space),
 * everything else is just turned into a string (by calling `str`) and added to the SQL string.
 
-> Note: you can provide additional inline formatting by extending the `InlineValue` protocol from `honey.sql.protocols` to new types.
-
-## `:numbered`
-
-By default, HoneySQL generates SQL using positional placeholders (`?`).
-Specifying `:numbered true` tells HoneySQL to generate SQL using
-numbered placeholders instead (`$1`, `$2`, etc). This can be set
-globally using `set-options!`.
-
 ## `:params`
 
 The `:params` option provides a mapping from named parameters
@@ -124,12 +99,12 @@ to values for this call to `format`. For example:
 ## `:quoted`
 
 If `:quoted true`, or `:dialect` is provided (and `:quoted` is not
-specified as `false`), SQL entity names that represent
+specified as `false`), identifiers that represent
 tables and columns will be quoted (stropped) according to the
 selected dialect.
 
-If `:quoted false`, SQL entity names that represent tables and columns
-will not be quoted. If those SQL entity names are reserved words in
+If `:quoted false`, identifiers that represent tables and columns
+will not be quoted. If those identifiers are reserved words in
 SQL, the generated SQL will be invalid.
 
 The quoting (stropping) is dialect-dependent:
@@ -138,23 +113,19 @@ The quoting (stropping) is dialect-dependent:
 * `:oracle` -- uses double quotes
 * `:sqlserver` -- user square brackets
 
-As of 2.3.928, if `:quoted` and `:dialect` are not provided, and no
-default quoting strategy has been specified (via `set-dialect!`) then
-alphanumeric SQL entity names will not be quoted but "unusual" SQL entity names will
-
 ## `:quoted-snake`
 
 Where strings are used to identify table or column names, they are
 treated as-is. If `:quoted true` (or a `:dialect` is specified),
-those SQL entity names are quoted as-is.
+those identifiers are quoted as-is.
 
 Where keywords or symbols are used to identify table or column
-names, and `:quoted true` is provided, those SQL entity names are
+names, and `:quoted true` is provided, those identifiers are
 quoted as-is.
 
-If `:quoted-snake true` is provided, those SQL entity names are quoted
+If `:quoted-snake true` is provided, those identifiers are quoted
 but any `-` in them are replaced by `_` -- that replacement is the
-default in unquoted SQL entity names.
+default in unquoted identifiers.
 
 This allows quoting to be used but still maintain the Clojure
 (kebab case) to SQL (snake case) mappings.


=====================================
doc/postgresql.md
=====================================
@@ -10,12 +10,6 @@ Everything that the nilenso library provided (in 0.4.112) is implemented
 directly in HoneySQL 2.x although a few things have a
 slightly different syntax.
 
-If you are using HoneySQL with the Node.js PostgreSQL driver, it
-only accepts numbered placeholders, not positional placeholders,
-so you will need to specify the `:numbered true` option that was
-added in 2.4.962. You may find it convenient to set this option
-globally, via `set-options!`.
-
 ## Code Examples
 
 The code examples herein assume:
@@ -322,14 +316,14 @@ user=> (-> (create-table :cities)
 ;; default values for columns:
 user=> (-> (create-table :distributors)
            (with-columns [[:did :integer [:primary-key]
-                                         ;; "serial" is inlined as 'serial':
+                                         ;; "serial" is inlined as 'SERIAL':
                                          [:default [:nextval "serial"]]]
                           [:name [:varchar 40] [:not nil]]])
            (sql/format {:pretty true}))
 ;; newlines inserted for readability:
 ["
 CREATE TABLE distributors
-(did INTEGER PRIMARY KEY DEFAULT NEXTVAL('serial'), name VARCHAR(40) NOT NULL)
+(did INTEGER PRIMARY KEY DEFAULT NEXTVAL('SERIAL'), name VARCHAR(40) NOT NULL)
 "]
 ;; PostgreSQL CHECK constraint is supported:
 user=> (-> (create-table :products)
@@ -341,7 +335,7 @@ user=> (-> (create-table :products)
            (sql/format {:pretty true}))
 ["
 CREATE TABLE products
-(product_no INTEGER, name TEXT, price NUMERIC CHECK(price > 0), discounted_price NUMERIC, CHECK((discounted_price > 0) AND (price > discounted_price)))
+(product_no INTEGER, name TEXT, price NUMERIC CHECK(PRICE > 0), discounted_price NUMERIC, CHECK((discounted_price > 0) AND (price > discounted_price)))
 "]
 ;; conditional creation:
 user=> (-> (create-table :products :if-not-exists)


=====================================
doc/special-syntax.md
=====================================
@@ -79,7 +79,7 @@ that produces a SQL type:
 
 ```clojure
 (sql/format-expr [:cast :a :int])
-;;=> ["CAST(a AS INT)"]
+;;=> ["CAST(a AS int)"]
 ```
 
 ## composite
@@ -198,8 +198,6 @@ that represents a time unit. Produces an `INTERVAL` expression:
 ;;=> ["DATE_ADD(NOW(), INTERVAL ? DAYS)" 30]
 ```
 
-> Note: PostgreSQL has an `INTERVAL` data type which is unrelated to this syntax. In PostgreSQL, the closet equivalent would be `[:cast "30 days" :interval]` which will lift `"30 days"` out as a parameter. In DDL, for PostgreSQL, you can use `:interval` to produce the `INTERVAL` data type (without wrapping it in a vector).
-
 ## lateral
 
 Accepts a single argument that can be a (`SELECT`) clause or


=====================================
src/honey/sql.cljc
=====================================
@@ -28,8 +28,7 @@
   * `sql-kw` -- turns a Clojure keyword (or symbol) into SQL code (makes
         it uppercase and replaces - with space). "
   (:refer-clojure :exclude [format])
-  (:require [clojure.string :as str]
-            [honey.sql.protocols :as p]))
+  (:require [clojure.string :as str]))
 
 ;; default formatting for known clauses
 
@@ -94,8 +93,6 @@
   [s x e]
   (str s (str/replace x (str e) (str e e)) e))
 
-(declare register-clause!)
-
 (def ^:private dialects
   (atom
    (reduce-kv (fn [m k v]
@@ -104,31 +101,20 @@
               {:ansi      {:quote #(strop \" % \")}
                :sqlserver {:quote #(strop \[ % \])}
                :mysql     {:quote #(strop \` % \`)
-                           :clause-order-fn
-                           #(do
-                              ;; side-effect: updates global clauses...
-                              (register-clause! :replace-into :insert-into :insert-into)
-                              (-> %
-                                  (add-clause-before :set :where)
-                                  ;; ...but not in-flight clauses:
-                                  (add-clause-before :replace-into :insert-into)))}
+                           :clause-order-fn #(add-clause-before % :set :where)}
                :oracle    {:quote #(strop \" % \") :as false}})))
 
 ; should become defonce
 (def ^:private default-dialect (atom (:ansi @dialects)))
 (def ^:private default-quoted (atom nil))
-(def ^:private default-quoted-snake (atom nil))
-(def ^:private default-inline (atom nil))
-(def ^:private default-checking (atom :none))
-(def ^:private default-numbered (atom false))
 
 (def ^:private ^:dynamic *dialect* nil)
 ;; nil would be a better default but that makes testing individual
 ;; functions harder than necessary:
 (def ^:private ^:dynamic *clause-order* default-clause-order)
-(def ^:private ^:dynamic *quoted* @default-quoted)
-(def ^:private ^:dynamic *quoted-snake* @default-quoted-snake)
-(def ^:private ^:dynamic *inline* @default-inline)
+(def ^:private ^:dynamic *quoted* nil)
+(def ^:private ^:dynamic *quoted-snake* nil)
+(def ^:private ^:dynamic *inline* nil)
 (def ^:private ^:dynamic *params* nil)
 (def ^:private ^:dynamic *values-default-columns* nil)
 ;; there is no way, currently, to enable suspicious characters
@@ -136,12 +122,11 @@
 ;; can be added to format to turn this on:
 (def ^:private ^:dynamic *allow-suspicious-entities* false)
 ;; "linting" mode (:none, :basic, :strict):
-(def ^:private ^:dynamic *checking* @default-checking)
+(def ^:private ^:dynamic *checking* :none)
 ;; the current DSL hash map being formatted (for contains-clause?):
 (def ^:private ^:dynamic *dsl* nil)
 ;; caching data to detect expressions that cannot be cached:
 (def ^:private ^:dynamic *caching* nil)
-(def ^:private ^:dynamic *numbered* nil)
 
 ;; clause helpers
 
@@ -224,25 +209,13 @@
   (let [col-fn      (if (or *quoted* (string? e))
                       (if *quoted-snake* name-_ name)
                       name-_)
-        col-e       (col-fn e)
-        dialect-q   (:quote *dialect* identity)
-        quote-fn    (cond (or *quoted* (string? e))
-                          dialect-q
-                          ;; #422: if default quoting and "unusual"
-                          ;; characters in entity, then quote it:
-                          (nil? *quoted*)
-                          (fn opt-quote [part]
-                            (if (re-find #"^[A-Za-z0-9_]+$" part)
-                              part
-                              (dialect-q part)))
-                          :else
-                          identity)
+        quote-fn    (if (or *quoted* (string? e)) (:quote *dialect*) identity)
         parts       (if-let [n (when-not (or drop-ns (string? e))
                                  (namespace-_ e))]
-                      [n col-e]
+                      [n (col-fn e)]
                       (if aliased
-                        [col-e]
-                        (str/split col-e #"\.")))
+                        [(col-fn e)]
+                        (str/split (col-fn e) #"\.")))
         entity      (str/join "." (map #(cond-> % (not= "*" %) (quote-fn)) parts))
         suspicious #";"]
     (when-not *allow-suspicious-entities*
@@ -277,10 +250,7 @@
   [k]
   (let [n (str/replace (name k) "?" "??")]
     (if (= \' (first n))
-      (let [ident   (subs n 1 (count n))
-            ident-l (str/lower-case ident)]
-        (binding [*quoted* (when-not (contains? #{"array"} ident-l) *quoted*)]
-          (format-entity (keyword ident))))
+      (format-entity (keyword (subs n 1 (count n))))
       (-> n (dehyphen) (upper-case)))))
 
 (defn- sym->kw
@@ -293,24 +263,16 @@
       (keyword (name s)))
     s))
 
-(extend-protocol p/InlineValue
-  nil
-  (sqlize [_] "NULL")
-  #?(:clj String :cljs string)
-  (sqlize [x] (str \' (str/replace x "'" "''") \'))
-  #?(:clj clojure.lang.Keyword :cljs Keyword)
-  (sqlize [x] (sql-kw x))
-  #?(:clj clojure.lang.Symbol :cljs Symbol)
-  (sqlize [x] (sql-kw x))
-  #?(:clj clojure.lang.IPersistentVector :cljs PersistentVector)
-  (sqlize [x] (str "[" (str/join ", " (map p/sqlize x)) "]"))
-  #?@(:clj [java.util.UUID
-            ;; issue 385: quoted UUIDs for PostgreSQL/ANSI
-            (sqlize [x] (str \' x \'))])
-  #?(:clj Object :cljs default)
-  (sqlize [x] (str x)))
-
-(defn- sqlize-value [x] (p/sqlize x))
+(defn- sqlize-value [x]
+  (cond
+    (nil? x)     "NULL"
+    (string? x)  (str \' (str/replace x "'" "''") \')
+    (ident? x)   (sql-kw x)
+    (vector? x)  (str "[" (str/join ", " (map #'sqlize-value x)) "]")
+    ;; issue 385: quoted UUIDs for PostgreSQL/ANSI
+    #?(:clj (instance? java.util.UUID x) :cljs false)
+    (str \' x \') ; UUID cannot contain quotes
+    :else        (str x)))
 
 (defn- param-value [k]
   (if (contains? *params* k)
@@ -323,20 +285,6 @@
     {::wrapper
      (fn [fk _] (param-value (fk)))}))
 
-(defn ->numbered [v]
-  (let [n (count (swap! *numbered* conj v))]
-    [(str "$" n) (with-meta (constantly (dec n))
-                   {::wrapper
-                    (fn [fk _] (get @*numbered* (fk)))})]))
-
-(defn ->numbered-param [k]
-  (let [n (count (swap! *numbered* conj k))]
-    [(str "$" n) (with-meta (constantly (dec n))
-                   {::wrapper
-                    (fn [fk _] (param-value (get @*numbered* (fk))))})]))
-
-(def ^:private ^:dynamic *formatted-column* (atom false))
-
 (defn- format-var [x & [opts]]
   ;; rather than name/namespace, we want to allow
   ;; for multiple / in the %fun.call case so that
@@ -349,16 +297,9 @@
                   "(" (str/join ", " quoted-args) ")")])
           (= \? (first c))
           (let [k (keyword (subs c 1))]
-            (cond *inline*
-                  [(sqlize-value (param-value k))]
-                  *numbered*
-                  (->numbered-param k)
-                  :else
-                  ["?" (->param k)]))
-          (= \' (first c))
-          (do
-            (reset! *formatted-column* true)
-            [(subs c 1)])
+            (if *inline*
+              [(sqlize-value (param-value k))]
+              ["?" (->param k)]))
           :else
           [(format-entity x opts)])))
 
@@ -571,27 +512,18 @@
       (into [(str (format-entity (first x)) " " sql)] params))
     [(format-entity x)]))
 
-(defn- format-with [k xs as-fn]
+(defn- format-with [k xs]
   ;; TODO: a sequence of pairs -- X AS expr -- where X is either [entity expr]
   ;; or just entity, as far as I can tell...
   (let [[sqls params]
-        (reduce-sql
-         (map
-          (fn [[x expr :as with]]
-            (let [[sql & params] (format-with-part x)
-                  non-query-expr? (or (ident? expr) (string? expr))
-                  [sql' & params'] (if non-query-expr?
-                                     (format-expr expr)
-                                     (format-dsl expr))]
-              (if non-query-expr?
-                (cond-> [(str sql' " AS " sql)]
-                        params' (into params')
-                        params  (into params))
-                ;; according to docs, CTE should _always_ be wrapped:
-                (cond-> [(str sql " " (as-fn with) " " (str "(" sql' ")"))]
-                        params  (into params)
-                        params' (into params')))))
-          xs))]
+        (reduce-sql (map (fn [[x expr]]
+                           (let [[sql & params]   (format-with-part x)
+                                 [sql' & params'] (format-dsl expr)]
+                         ;; according to docs, CTE should _always_ be wrapped:
+                             (cond-> [(str sql " AS " (str "(" sql' ")"))]
+                               params  (into params)
+                               params' (into params'))))
+                         xs))]
     (into [(str (sql-kw k) " " (str/join ", " sqls))] params)))
 
 (defn- format-selector [k xs]
@@ -744,79 +676,59 @@
                 (str " " (sql-kw nowait))))))]))
 
 (defn- format-values [k xs]
-  (let [first-xs (when (sequential? xs) (first (drop-while ident? xs)))]
-    (cond (contains? #{:default 'default} xs)
-          [(str (sql-kw xs) " " (sql-kw k))]
-          (empty? xs)
-          [(str (sql-kw k) " ()")]
-          (sequential? first-xs)
-          ;; [[1 2 3] [4 5 6]]
-          (let [n-1 (map count (filter sequential? xs))
-                ;; issue #291: ensure all value sequences are the same length
-                xs' (if (apply = n-1)
-                      xs
-                      (let [n-n (when (seq n-1) (apply max n-1))]
-                        (map (fn [x]
-                               (if (sequential? x)
-                                 (take n-n (concat x (repeat nil)))
-                                 x))
-                             xs)))
-                [sqls params]
-                (reduce (fn [[sql params] [sqls' params']]
-                          [(conj sql
-                                 (if (sequential? sqls')
-                                   (str "(" (str/join ", " sqls') ")")
-                                   sqls'))
-                           (into params params')])
-                        [[] []]
-                        (map #(if (sequential? %)
-                                (format-expr-list %)
-                                [(sql-kw %)])
-                             xs'))]
-            (into [(str (sql-kw k) " " (str/join ", " sqls))] params))
-
-          (map? first-xs)
-          ;; [{:a 1 :b 2 :c 3}]
-          (let [cols-1 (keys (first xs))
-                ;; issue #291: check for all keys in all maps but still
-                ;; use the keys from the first map if they match so that
-                ;; users can rely on the key ordering if they want to,
-                ;; e.g., see test that uses array-map for the first row
-                cols-n (into #{} (mapcat keys) (filter map? xs))
-                cols   (if (= (set cols-1) cols-n) cols-1 cols-n)
-                [sqls params]
-                (reduce (fn [[sql params] [sqls' params']]
-                          [(conj sql
-                                 (if (sequential? sqls')
-                                   (str "(" (str/join ", " sqls') ")")
-                                   sqls'))
-                           (if params' (into params params') params')])
-                        [[] []]
-                        (map (fn [m]
-                               (if (map? m)
-                                 (format-expr-list
-                                  (map #(get m
-                                             %
-                                             ;; issue #366: use NULL or DEFAULT
-                                             ;; for missing column values:
-                                             (if (contains? *values-default-columns* %)
-                                               [:default]
-                                               nil))
-                                       cols))
-                                 [(sql-kw m)]))
-                             xs))]
-            (into [(str "("
-                        (str/join ", "
-                                  (map #(format-entity % {:drop-ns true}) cols))
-                        ") "
-                        (sql-kw k)
-                        " "
-                        (str/join ", " sqls))]
-                  params))
+  (cond (sequential? (first xs))
+        ;; [[1 2 3] [4 5 6]]
+        (let [n-1 (map count xs)
+              ;; issue #291: ensure all value sequences are the same length
+              xs' (if (apply = n-1)
+                    xs
+                    (let [n-n (apply max n-1)]
+                      (map (fn [x] (take n-n (concat x (repeat nil)))) xs)))
+              [sqls params]
+              (reduce (fn [[sql params] [sqls' params']]
+                        [(conj sql (str "(" (str/join ", " sqls') ")"))
+                         (into params params')])
+                      [[] []]
+                      (map #'format-expr-list xs'))]
+          (into [(str (sql-kw k) " " (str/join ", " sqls))] params))
+
+        (map? (first xs))
+        ;; [{:a 1 :b 2 :c 3}]
+        (let [cols-1 (keys (first xs))
+              ;; issue #291: check for all keys in all maps but still
+              ;; use the keys from the first map if they match so that
+              ;; users can rely on the key ordering if they want to,
+              ;; e.g., see test that uses array-map for the first row
+              cols-n (into #{} (mapcat keys) xs)
+              cols   (if (= (set cols-1) cols-n) cols-1 cols-n)
+              [sqls params]
+              (reduce (fn [[sql params] [sqls' params']]
+                        [(conj sql (str "(" (str/join ", " sqls') ")"))
+                         (if params' (into params params') params')])
+                      [[] []]
+                      (map (fn [m]
+                             (format-expr-list
+                              (map #(get m
+                                         %
+                                         ;; issue #366: use NULL or DEFAULT
+                                         ;; for missing column values:
+                                         (if (contains? *values-default-columns* %)
+                                           [:default]
+                                           nil))
+                                   cols)))
+                           xs))]
+          (into [(str "("
+                      (str/join ", "
+                                (map #(format-entity % {:drop-ns true}) cols))
+                      ") "
+                      (sql-kw k)
+                      " "
+                      (str/join ", " sqls))]
+                params))
 
-          :else
-          (throw (ex-info ":values expects a sequence of rows (maps) or column values (sequences)"
-                          {:first (first xs)})))))
+        :else
+        (throw (ex-info ":values expects sequences or maps"
+                        {:first (first xs)}))))
 
 (comment
   (into #{} (mapcat keys) [{:a 1 :b 2} {:b 3 :c 4}])
@@ -899,17 +811,6 @@
             (str " " (str/join ", " (map #(format-simple-clause % "column/index operations") clauses)))))]
     [(str (sql-kw k) " " (format-entity x))]))
 
-(def ^:private special-ddl-keywords
-  "If these are found in DDL, they should map to the given
-  SQL string instead of what sql-kw would do."
-  {:auto-increment "AUTO_INCREMENT"})
-
-(defn- sql-kw-ddl
-  "Handle SQL keywords in DDL (allowing for special/exceptions)."
-  [id]
-  (or (get special-ddl-keywords (sym->kw id))
-      (sql-kw id)))
-
 (defn- format-ddl-options
   "Given a sequence of options for a DDL statement (the part that
   comes between the entity name being created/dropped and the
@@ -923,54 +824,33 @@
           (str/join " "
                     (map (fn [e]
                            (if (ident? e)
-                             (sql-kw-ddl e)
+                             (sql-kw e)
                              (format-simple-expr e context)))
                          opt))
-          (ident? opt)
-          (sql-kw-ddl opt)
           :else
-          (throw (ex-info "expected symbol or keyword"
-                          {:unexpected opt})))))
+          (sql-kw opt))))
 
-(defn- destructure-ddl-item [table context]
+(defn- destructure-create-item [table context]
   (let [params
         (if (sequential? table)
           table
           [table])
         tab? #(or (ident? %) (string? %))
         coll (take-while tab? params)
-        opts (filter some? (drop-while tab? params))
+        opts (drop-while tab? params)
         ine  (last coll)
         [prequel table ine]
         (if (= :if-not-exists (sym->kw ine))
           [(butlast (butlast coll)) (last (butlast coll)) ine]
           [(butlast coll) (last coll) nil])]
     (into [(str/join " " (map sql-kw prequel))
-           (when table (format-entity table))
+           (format-entity table)
            (when ine (sql-kw ine))]
-          (when opts
-            (format-ddl-options opts context)))))
-
-(defn- format-truncate [k xs]
-  (let [[table & options] (if (sequential? xs) xs [xs])
-        [pre table ine options] (destructure-ddl-item [table options] "truncate")]
-    (when (seq pre) (throw (ex-info "TRUNCATE syntax error" {:unexpected pre})))
-    (when (seq ine) (throw (ex-info "TRUNCATE syntax error" {:unexpected ine})))
-    [(str/join " " (cond-> [(sql-kw k) table]
-                     (seq options)
-                     (conj options)))]))
-
-(comment
-  (destructure-ddl-item [:foo [:abc [:continue :wibble] :identity]] "test")
-  (destructure-ddl-item [:foo] "test")
-  (destructure-ddl-item [:id [:int :unsigned :auto-increment]] "test")
-  (destructure-ddl-item [[[:foreign-key :bar]] :quux [[:wibble :wobble]]] "test")
-  (format-truncate :truncate [:foo])
-  )
+          (format-ddl-options opts context))))
 
 (defn- format-create [q k item as]
   (let [[pre entity ine & more]
-        (destructure-ddl-item item (str (sql-kw q) " options"))]
+        (destructure-create-item item (str (sql-kw q) " options"))]
     [(str/join " " (remove nil?
                            (-> [(sql-kw q)
                                 (when (and (= :create q) (seq pre)) pre)
@@ -1008,48 +888,26 @@
   (let [[if-exists tables & more] (destructure-drop-items params "DROP options")]
     [(str/join " " (remove nil? (into [(sql-kw k) if-exists tables] more)))]))
 
-(defn- format-single-column [xs]
-  (let [[col & options] (if (ident? (first xs)) xs (cons nil xs))
-        [pre col ine & options]
-        (destructure-ddl-item [col options] "column operation")]
-    (when (seq pre) (throw (ex-info "column syntax error" {:unexpected pre})))
-    (when (seq ine) (throw (ex-info "column syntax error" {:unexpected ine})))
-    (str/join " " (filter seq (cons col options)))))
+(def ^:private ^:dynamic *formatted-column* (atom false))
 
-(comment
-  (destructure-ddl-item [:foo [:abc [:continue :wibble] :identity]] "test")
-  (destructure-ddl-item [:foo] "test")
-  (destructure-ddl-item [:id [:int :unsigned :auto-increment]] "test")
-  (format-single-column [:id :int :unsigned :auto-increment])
-  (format-single-column [[:constraint :code_title] [:primary-key :code :title]])
-  (destructure-ddl-item [[[:foreign-key :bar]] :quux [[:wibble :wobble]]] "test")
-
-  (format-truncate :truncate [:foo])
-
-  (destructure-ddl-item [:address [:text]] "test")
-  (format-single-column [:address :text])
-  (format-single-column [:did :uuid [:default [:gen_random_uuid]]])
-  )
+(defn- format-single-column [xs]
+  (reset! *formatted-column* true)
+  (str/join " " (cons (format-simple-expr (first xs) "column operation")
+                      (map #(binding [*formatted-column* (atom false)]
+                              (cond-> (format-simple-expr % "column operation")
+                                (not @*formatted-column*)
+                                (upper-case)))
+                           (rest xs)))))
 
 (defn- format-table-columns [_ xs]
   [(str "("
         (str/join ", " (map #'format-single-column xs))
         ")")])
 
-(defn- format-add-single-item [k spec]
-  (if (contains? #{:if-not-exists 'if-not-exists} (last spec))
-    (str (sql-kw k) " " (sql-kw :if-not-exists) " " (format-single-column (butlast spec)))
-    (str (sql-kw k) " " (format-single-column spec))))
-
 (defn- format-add-item [k spec]
-  (let [items (if (and (sequential? spec) (sequential? (first spec))) spec [spec])]
-    [(str/join ", " (for [item items] (format-add-single-item k item)))]))
-
-(comment
-  (format-add-item :add-column [:address :text])
-  (format-add-single-item :add-column [:address :text])
-  (format-single-column [:address :text])
-  )
+  (if (contains? #{:if-not-exists 'if-not-exists} (last spec))
+    [(str (sql-kw k) " " (sql-kw :if-not-exists) " " (format-single-column (butlast spec)))]
+    [(str (sql-kw k) " " (format-single-column spec))]))
 
 (defn- format-rename-item [k [x y]]
   [(str (sql-kw k) " " (format-entity x) " TO " (format-entity y))])
@@ -1068,43 +926,6 @@
       (into [(str/join sqls)] params))
     [s]))
 
-(defn- destructure-drop-columns [tables]
-  (let [params
-        (if (sequential? tables)
-          tables
-          [tables])
-        _    (when-not (every? ident? params)
-               (throw (ex-info "DROP COLUMNS expects just column names"
-                               {:tables tables})))]
-    (loop [if-exists false coll params sqls []]
-      (if (seq coll)
-        (if (#{:if-exists 'if-exists} (first coll))
-          (recur true (rest coll) sqls)
-          (recur false (rest coll)
-                 (conj sqls (cond->> (format-entity (first coll))
-                              if-exists
-                              (str (sql-kw :if-exists) " ")))))
-        (if if-exists
-          (throw (ex-info (str "DROP COLUMNS: missing column name after IF EXISTS")
-                          {:tables tables}))
-          sqls)))))
-
-(defn- format-drop-columns
-  [k params]
-  (let [tables (destructure-drop-columns params)]
-    [(str/join ", " (mapv #(str (sql-kw k) " " %) tables))]))
-
-(defn- check-where
-  "Given a formatter function, performs a pre-flight check that there is
-  a non-empty where clause if at least basic checking is enabled."
-  [formatter]
-  (fn [k xs]
-    (when-not (= :none *checking*)
-      (when-not (seq (:where *dsl*))
-        (throw (ex-info (str (sql-kw k) " without a non-empty WHERE clause is dangerous")
-                        {:clause k :where (:where *dsl*)}))))
-    (formatter k xs)))
-
 (def ^:private base-clause-order
   "The (base) order for known clauses. Can have items added and removed.
 
@@ -1122,7 +943,7 @@
   and removed."
   (atom {:alter-table     #'format-alter-table
          :add-column      #'format-add-item
-         :drop-column     #'format-drop-columns
+         :drop-column     #'format-drop-items
          :alter-column    (fn [k spec]
                             (format-add-item
                              (if (mysql?) :modify-column k)
@@ -1148,15 +969,8 @@
          :nest            (fn [_ x]
                             (let [[sql & params] (format-dsl x {:nested true})]
                               (into [sql] params)))
-         :with            (let [as-fn
-                                (fn [[_ _ materialization]]
-                                  (condp = materialization
-                                    :materialized "AS MATERIALIZED"
-                                    :not-materialized "AS NOT MATERIALIZED"
-                                    "AS"))]
-                            (fn [k xs] (format-with k xs as-fn)))
-         :with-recursive  (let [as-fn (constantly "AS")]
-                            (fn [k xs] (format-with k xs as-fn)))
+         :with            #'format-with
+         :with-recursive  #'format-with
          :intersect       #'format-on-set-op
          :union           #'format-on-set-op
          :union-all       #'format-on-set-op
@@ -1171,10 +985,10 @@
          :into            #'format-select-into
          :bulk-collect-into #'format-select-into
          :insert-into     #'format-insert
-         :update          (check-where #'format-selector)
-         :delete          (check-where #'format-selects)
-         :delete-from     (check-where #'format-selector)
-         :truncate        #'format-truncate
+         :update          #'format-selector
+         :delete          #'format-selects
+         :delete-from     #'format-selector
+         :truncate        #'format-selector
          :columns         #'format-columns
          :set             #'format-set-exprs
          :from            #'format-selects
@@ -1296,44 +1110,30 @@
 (defn- format-in [in [x y]]
   (let [[sql-x & params-x] (format-expr x {:nested true})
         [sql-y & params-y] (format-expr y {:nested true})
-        [v1 :as values]    (map #(unwrap % {}) params-y)]
+        values             (unwrap (first params-y) {})]
     ;; #396: prevent caching IN () when named parameter is used:
     (when (and (meta (first params-y))
                (::wrapper (meta (first params-y)))
                *caching*)
       (throw (ex-info "SQL that includes IN () expressions cannot be cached" {})))
     (when-not (= :none *checking*)
-      (when (or (and (sequential? y)  (empty? y))
-                (and (sequential? v1) (empty? v1)))
+      (when (or (and (sequential? y)      (empty? y))
+                (and (sequential? values) (empty? values)))
         (throw (ex-info "IN () empty collection is illegal"
                         {:clause [in x y]})))
       (when (and (= :strict *checking*)
-                 (or (and (sequential? y)  (some nil? y))
-                     (and (sequential? v1) (some nil? v1))))
+                 (or (and (sequential? y)      (some nil? y))
+                     (and (sequential? values) (some nil? values))))
         (throw (ex-info "IN (NULL) does not match"
                         {:clause [in x y]}))))
-    (cond (and (not *numbered*)
-               (= "?" sql-y)
-               (= 1 (count params-y))
-               (coll? v1))
-          (let [sql (str "(" (str/join ", " (repeat (count v1) "?")) ")")]
-            (-> [(str sql-x " " (sql-kw in) " " sql)]
-                (into params-x)
-                (into v1)))
-          (and *numbered*
-               (= (str "$" (count @*numbered*)) sql-y)
-               (= 1 (count params-y))
-               (coll? v1))
-          (let [vs  (for [v v1] (->numbered v))
-                sql (str "(" (str/join ", " (map first vs)) ")")]
-            (-> [(str sql-x " " (sql-kw in) " " sql)]
-                (into params-x)
-                (conj nil)
-                (into (map second vs))))
-          :else
-          (-> [(str sql-x " " (sql-kw in) " " sql-y)]
-              (into params-x)
-              (into (if *numbered* values params-y))))))
+    (if (and (= "?" sql-y) (= 1 (count params-y)) (coll? values))
+      (let [sql (str "(" (str/join ", " (repeat (count values) "?")) ")")]
+        (-> [(str sql-x " " (sql-kw in) " " sql)]
+            (into params-x)
+            (into values)))
+      (-> [(str sql-x " " (sql-kw in) " " sql-y)]
+          (into params-x)
+          (into params-y)))))
 
 (defn- function-0 [k xs]
   [(str (sql-kw k)
@@ -1432,7 +1232,7 @@
     ;; bigquery column types:
     :bigquery/array (fn [_ spec]
                       [(str "ARRAY<"
-                            (str/join " " (map #(sql-kw %) spec))
+                            (str/join " " (map #(format-simple-expr % "column operation") spec))
                             ">")])
     :bigquery/struct (fn [_ spec]
                        [(str "STRUCT<"
@@ -1457,9 +1257,7 @@
     :cast
     (fn [_ [x type]]
       (let [[sql & params]   (format-expr x)
-            [sql' & params'] (if (ident? type)
-                               [(sql-kw type)]
-                               (format-expr type))]
+            [sql' & params'] (format-expr type)]
         (-> [(str "CAST(" sql " AS " sql' ")")]
             (into params)
             (into params'))))
@@ -1496,16 +1294,13 @@
           (into [(str "LATERAL " sql)] params))))
     :lift
     (fn [_ [x]]
-      (cond *inline*
-            ;; this is pretty much always going to be wrong,
-            ;; but it could produce a valid result so we just
-            ;; assume that the user knows what they are doing:
-            [(sqlize-value x)]
-            *numbered*
-            (->numbered x)
-            :else
-            ["?" (with-meta (constantly x)
-                   {::wrapper (fn [fx _] (fx))})]))
+      (if *inline*
+        ;; this is pretty much always going to be wrong,
+        ;; but it could produce a valid result so we just
+        ;; assume that the user knows what they are doing:
+        [(sqlize-value x)]
+        ["?" (with-meta (constantly x)
+               {::wrapper (fn [fx _] (fx))})]))
     :nest
     (fn [_ [x]]
       (let [[sql & params] (format-expr x)]
@@ -1537,12 +1332,9 @@
         (into [(str/join ", " sqls)] params)))
     :param
     (fn [_ [k]]
-      (cond *inline*
-            [(sqlize-value (param-value k))]
-            *numbered*
-            (->numbered-param k)
-            :else
-            ["?" (->param k)]))
+      (if *inline*
+        [(sqlize-value (param-value k))]
+        ["?" (->param k)]))
     :raw
     (fn [_ [xs]]
       (raw-render xs))
@@ -1623,12 +1415,9 @@
         ["NULL"]
 
         :else
-        (cond *inline*
-              [(sqlize-value expr)]
-              *numbered*
-              (->numbered expr)
-              :else
-              ["?" expr])))
+        (if *inline*
+          [(sqlize-value expr)]
+          ["?" expr])))
 
 (defn- check-dialect [dialect]
   (when-not (contains? @dialects dialect)
@@ -1668,34 +1457,27 @@
   ([data opts]
    (let [cache    (:cache opts)
          dialect? (contains? opts :dialect)
-         dialect  (when dialect? (get @dialects (check-dialect (:dialect opts))))
-         numbered (if (contains? opts :numbered)
-                    (:numbered opts)
-                    @default-numbered)]
+         dialect  (when dialect? (get @dialects (check-dialect (:dialect opts))))]
      (binding [*dialect* (if dialect? dialect @default-dialect)
                *caching* cache
                *checking* (if (contains? opts :checking)
                             (:checking opts)
-                            @default-checking)
+                            :none)
                *clause-order* (if dialect?
                                 (if-let [f (:clause-order-fn dialect)]
                                   (f @base-clause-order)
                                   @current-clause-order)
                                 @current-clause-order)
-               *inline*  (if (contains? opts :inline)
-                           (:inline opts)
-                           @default-inline)
-               *numbered* (when numbered
-                            (atom []))
+               *inline*  (when (contains? opts :inline)
+                           (:inline opts))
                *quoted*  (cond (contains? opts :quoted)
                                (:quoted opts)
                                dialect?
                                true
                                :else
                                @default-quoted)
-               *quoted-snake* (if (contains? opts :quoted-snake)
-                                (:quoted-snake opts)
-                                @default-quoted-snake)
+               *quoted-snake* (when (contains? opts :quoted-snake)
+                                (:quoted-snake opts))
                *params* (:params opts)
                *values-default-columns* (:values-default-columns opts)]
        (if cache
@@ -1710,10 +1492,7 @@
   Can be: `:ansi` (the default), `:mysql`, `:oracle`, or `:sqlserver`.
 
   Can optionally accept `:quoted true` (or `:quoted false`) to set the
-  default global quoting strategy. Without `:quoted`, the default global
-  quoting strategy will be reset (only quoting unusual entity names).
-
-  Note that calling `set-options!` can override this default.
+  default global quoting strategy.
 
   Dialects are always applied to the base order to create the current order."
   [dialect & {:keys [quoted]}]
@@ -1722,31 +1501,6 @@
     (reset! current-clause-order (f @base-clause-order)))
   (reset! default-quoted quoted))
 
-(defn set-options!
-  "Set default values for any or all of the following options:
-  * :checking
-  * :inline
-  * :numbered
-  * :quoted
-  * :quoted-snake
-  Note that calling `set-dialect!` can override the default for `:quoted`."
-  [opts]
-  (let [unknowns (dissoc opts :checking :inline :numbered :quoted :quoted-snake)]
-    (when (seq unknowns)
-      (throw (ex-info (str (str/join ", " (keys unknowns))
-                           " are not options that can be set globally.")
-                      unknowns)))
-    (when (contains? opts :checking)
-      (reset! default-checking (:checking opts)))
-    (when (contains? opts :inline)
-      (reset! default-inline (:inline opts)))
-    (when (contains? opts :numbered)
-      (reset! default-numbered (:numbered opts)))
-    (when (contains? opts :quoted)
-      (reset! default-quoted (:quoted opts)))
-    (when (contains? opts :quoted-snake)
-      (reset! default-quoted-snake (:quoted-snake opts)))))
-
 (defn clause-order
   "Return the current order that known clauses will be applied when
   formatting a data structure into SQL. This may be useful when you are


=====================================
src/honey/sql/helpers.cljc
=====================================
@@ -127,7 +127,7 @@
 
 (defn- helper-merge [data k args]
   (if-let [merge-fn (special-merges k)]
-    (if-some [clause (merge-fn (get data k) args)]
+    (if-let [clause (merge-fn (get data k) args)]
       (assoc data k clause)
       data)
     (clojure.core/update data k default-merge args)))
@@ -138,12 +138,6 @@
       (helper-merge data k args))
     (helper-merge {} k args)))
 
-(defn- generic-grouped [k args]
-  (if (map? (first args))
-    (let [[data & args] args]
-      (helper-merge data k [args]))
-    (helper-merge {} k [args])))
-
 (defn- generic-1 [k [data arg]]
   (if (map? data)
     (assoc data k arg)
@@ -175,18 +169,15 @@
 
   (add-column :name [:varchar 32] [:not nil])"
   [& col-elems]
-  (generic-grouped :add-column col-elems))
+  (generic :add-column col-elems))
 
 (defn drop-column
-  "Takes one or more column names (use with `alter-table`).
+  "Takes a single column name (use with `alter-table`).
 
-  Accepts an `IF EXISTS` flag (keyword or symbol) before
-  any column names.
-
-  (alter-table :foo (drop-column :bar :if-exists :quux))"
+  (alter-table :foo (drop-column :bar))"
   {:arglists '([col])}
-  [& col-elems]
-  (generic :drop-column col-elems))
+  [& args]
+  (generic-1 :drop-column args))
 
 (defn alter-column
   "Like add-column, accepts any number of SQL elements
@@ -194,7 +185,7 @@
 
   (alter-column :name [:varchar 64] [:not nil])"
   [& col-elems]
-  (generic-grouped :alter-column col-elems))
+  (generic :alter-column col-elems))
 
 (defn modify-column
   "Like add-column, accepts any number of SQL elements
@@ -205,7 +196,7 @@
   MySQL-specific, deprecated. Use `alter-column` and
   specify the MySQL dialect to get `MODIFY COLUMN`."
   [& col-elems]
-  (generic-grouped :modify-column col-elems))
+  (generic :modify-column col-elems))
 
 (defn rename-column
   "Accepts two column names: the original name and the


=====================================
src/honey/sql/protocols.cljc deleted
=====================================
@@ -1,8 +0,0 @@
-;; copyright (c) 2022 sean corfield, all rights reserved
-
-(ns honey.sql.protocols
-  "InlineValue -- a protocol that defines how to inline
-    values; (sqlize x) produces a SQL string for x.")
-
-(defprotocol InlineValue :extend-via-metadata true
-  (sqlize [this] "Render value inline in a SQL string."))


=====================================
test/honey/sql/helpers_test.cljc
=====================================
@@ -1,4 +1,4 @@
-;; copyright (c) 2020-2022 sean corfield, all rights reserved
+;; copyright (c) 2020-2021 sean corfield, all rights reserved
 
 (ns honey.sql.helpers-test
   (:refer-clojure :exclude [filter for group-by partition-by set update])
@@ -249,19 +249,10 @@
                (sql/format))))))
 
 (deftest test-cast
-  (is (= ["SELECT foo, CAST(bar AS INTEGER)"]
+  (is (= ["SELECT foo, CAST(bar AS integer)"]
          (sql/format {:select [:foo [[:cast :bar :integer]]]})))
-  (is (= ["SELECT foo, CAST(bar AS INTEGER)"]
-         (sql/format {:select [:foo [[:cast :bar 'integer]]]})))
-  (is (= ["SELECT foo, CAST(bar AS DOUBLE PRECISION)"] ;; Postgres example
-         (sql/format {:select [:foo [[:cast :bar :double-precision]]]})))
-  (is (= ["SELECT \"foo\", CAST(\"bar\" AS INTEGER)"]
-         (sql/format {:select [:foo [[:cast :bar :integer]]]} {:quoted true})))
-  (is (= ["SELECT `foo`, CAST(`bar` AS INTEGER)"]
-         (sql/format {:select [:foo [[:cast :bar :integer]]]} {:dialect :mysql})))
-  (is (= ["SELECT `foo`, CAST(`bar` AS CHAR(10))"]
-         (sql/format {:select [:foo [[:cast :bar [:char 10]]]]} {:dialect :mysql
-                                                                 :inline true}))))
+  (is (= ["SELECT foo, CAST(bar AS integer)"]
+         (sql/format {:select [:foo [[:cast :bar 'integer]]]}))))
 
 (deftest test-value
   (is (= ["INSERT INTO foo (bar) VALUES (?)" {:baz "my-val"}]
@@ -322,17 +313,7 @@
                (sql/format {:select [:*]
                             :from [:customers]
                             :where [:in :id :?ids]}
-                           {:params {:ids values}})))
-        (is (= ["SELECT * FROM customers WHERE id IN ($1, $2)" "1" "2"]
-               (sql/format {:select [:*]
-                            :from [:customers]
-                            :where [:in :id values]}
-                           {:numbered true})))
-        (is (= ["SELECT * FROM customers WHERE id IN ($2, $3)" nil "1" "2"]
-               (sql/format {:select [:*]
-                            :from [:customers]
-                            :where [:in :id :?ids]}
-                           {:params {:ids values} :numbered true})))))))
+                           {:params {:ids values}})))))))
 
 (deftest test-case
   (is (= ["SELECT CASE WHEN foo < ? THEN ? WHEN (foo > ?) AND ((foo MOD ?) = ?) THEN foo / ? ELSE ? END FROM bar"
@@ -650,20 +631,10 @@
   (is (= (sql/format (-> (alter-table :fruit)
                          (add-column :id :int [:not nil])))
          ["ALTER TABLE fruit ADD COLUMN id INT NOT NULL"]))
-  (is (= (sql/format (-> (alter-table :fruit)
-                         (add-column :id :int [:not nil])
-                         (add-column :a1 :int nil)
-                         (add-column :be :text [:not nil])))
-         ["ALTER TABLE fruit ADD COLUMN id INT NOT NULL, ADD COLUMN a1 INT NULL, ADD COLUMN be TEXT NOT NULL"]))
   (is (= (sql/format (alter-table :fruit
                                   (add-column :id :int [:not nil])
-                                  (drop-column :ident)
-                                  (drop-column :if-exists :another)))
-         ["ALTER TABLE fruit ADD COLUMN id INT NOT NULL, DROP COLUMN ident, DROP COLUMN IF EXISTS another"]))
-  (is (= (sql/format (alter-table :fruit
-                                  (drop-column :a :b :if-exists :c :d)
-                                  (drop-column :if-exists :e)))
-         ["ALTER TABLE fruit DROP COLUMN a, DROP COLUMN b, DROP COLUMN IF EXISTS c, DROP COLUMN d, DROP COLUMN IF EXISTS e"])))
+                                  (drop-column :ident)))
+         ["ALTER TABLE fruit ADD COLUMN id INT NOT NULL, DROP COLUMN ident"])))
 
 (deftest issue-293-insert-into-data
   ;; insert into as (and other tests) based on :insert-into
@@ -906,10 +877,3 @@
            {:with [[:a]],
             :insert-into [[:quux [:x :y]]
                           {:select [:id], :from [:table]}]}))))
-
-(deftest issue-431
-  (testing "where false should not be ignored"
-    (is (= {:where false}
-           (where false)))
-    (is (= ["SELECT * FROM table WHERE FALSE"]
-           (sql/format {:select [:*] :from [:table] :where false})))))


=====================================
test/honey/sql/postgres_test.cljc
=====================================
@@ -185,7 +185,7 @@
                               [:location :point]])
                sql/format))))
   (testing "create table with foreign key reference"
-    (is (= ["CREATE TABLE weather (city VARCHAR(80) REFERENCES cities(city), temp_lo INT, temp_hi INT, prcp REAL, date DATE)"]
+    (is (= ["CREATE TABLE weather (city VARCHAR(80) REFERENCES CITIES(CITY), temp_lo INT, temp_hi INT, prcp REAL, date DATE)"]
            (-> (create-table :weather)
                (with-columns [[:city [:varchar :80] [:references :cities :city]]
                               [:temp_lo :int]
@@ -194,7 +194,7 @@
                               [:date :date]])
                sql/format))))
   (testing "creating table with table level constraint"
-    (is (= ["CREATE TABLE films (code CHAR(5), title VARCHAR(40), did INTEGER, date_prod DATE, kind VARCHAR(10), CONSTRAINT code_title PRIMARY KEY(code, title))"]
+    (is (= ["CREATE TABLE films (code CHAR(5), title VARCHAR(40), did INTEGER, date_prod DATE, kind VARCHAR(10), CONSTRAINT code_title PRIMARY KEY(CODE, TITLE))"]
            (-> (create-table :films)
                (with-columns [[:code [:char 5]]
                               [:title [:varchar 40]]
@@ -204,7 +204,7 @@
                               [[:constraint :code_title] [:primary-key :code :title]]])
                sql/format))))
   (testing "creating table with column level constraint"
-    (is (= ["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))"]
+    (is (= ["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))"]
            (-> (create-table :films)
                (with-columns [[:code [:char 5] [:constraint :firstkey] [:primary-key]]
                               [:title [:varchar 40] [:not nil]]
@@ -213,13 +213,13 @@
                               [:kind [:varchar 10]]])
                sql/format))))
   (testing "creating table with columns with default values"
-    (is (= ["CREATE TABLE distributors (did INTEGER PRIMARY KEY DEFAULT NEXTVAL('serial'), name VARCHAR(40) NOT NULL)"]
+    (is (= ["CREATE TABLE distributors (did INTEGER PRIMARY KEY DEFAULT NEXTVAL('SERIAL'), name VARCHAR(40) NOT NULL)"]
            (-> (create-table :distributors)
                (with-columns [[:did :integer [:primary-key] [:default [:nextval "serial"]]]
                               [:name [:varchar 40] [:not nil]]])
                sql/format))))
   (testing "creating table with column checks"
-    (is (= ["CREATE TABLE products (product_no INTEGER, name TEXT, price NUMERIC CHECK(price > 0), discounted_price NUMERIC, CHECK((discounted_price > 0) AND (price > discounted_price)))"]
+    (is (= ["CREATE TABLE products (product_no INTEGER, name TEXT, price NUMERIC CHECK(PRICE > 0), discounted_price NUMERIC, CHECK((discounted_price > 0) AND (price > discounted_price)))"]
            (-> (create-table :products)
                (with-columns [[:product_no :integer]
                               [:name :text]
@@ -228,32 +228,6 @@
                               [[:check [:and [:> :discounted_price 0] [:> :price :discounted_price]]]]])
                sql/format)))))
 
-(deftest references-issue-386
-  (is (= ["CREATE TABLE IF NOT EXISTS user (id VARCHAR(255) NOT NULL PRIMARY KEY, company_id INT NOT NULL, name VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, created_time DATETIME DEFAULT CURRENT_TIMESTAMP, updated_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, FOREIGN KEY(company_id) REFERENCES company(id))"]
-         (-> {:create-table [:user :if-not-exists]
-              :with-columns
-              [[:id [:varchar 255] [:not nil] [:primary-key]]
-               [:company-id :int [:not nil]]
-               [:name [:varchar 255] [:not nil]]
-               [:password [:varchar 255] [:not nil]]
-               [:created-time :datetime [:default :CURRENT_TIMESTAMP]]
-               [:updated-time :datetime [:default :CURRENT_TIMESTAMP]
-                :on :update :CURRENT_TIMESTAMP]
-               [[:foreign-key :company-id] [:references :company :id]]]}
-             (sql/format)))))
-
-(deftest create-table-issue-437
-  (is (= ["CREATE TABLE bar (did UUID DEFAULT GEN_RANDOM_UUID(), foo_id VARCHAR NOT NULL, PRIMARY KEY(did, foo_id), FOREIGN KEY(foo_id) REFERENCES foo(id) ON DELETE CASCADE)"]
-         (-> (create-table :bar)
-             (with-columns
-               [[:did :uuid [:default [:gen_random_uuid]]]
-                [:foo-id :varchar [:not nil]]
-                [[:primary-key :did :foo-id]]
-                [[:foreign-key :foo-id]
-                 [:references :foo :id]
-                 :on-delete :cascade]])
-             (sql/format)))))
-
 (deftest over-test
   (testing "window function over on select statemt"
     (is (= ["SELECT id, AVG(salary) OVER (PARTITION BY department ORDER BY designation ASC) AS Average, MAX(salary) OVER w AS MaxSalary FROM employee WINDOW w AS (PARTITION BY department)"]


=====================================
test/honey/sql_test.cljc
=====================================
@@ -94,38 +94,6 @@
   (is (= ["SELECT * FROM \"table\" WHERE \"id\" IN (?, ?, ?, ?)" 1 2 3 4]
          (sut/format {:select [:*] :from [:table] :where [:in :id [1 2 3 4]]} {:quoted true}))))
 
-(deftest general-numbered-tests
-  (is (= ["SELECT * FROM \"table\" WHERE \"id\" = $1" 1]
-         (sut/format {:select [:*] :from [:table] :where [:= :id 1]}
-                     {:quoted true :numbered true})))
-  (is (= ["SELECT * FROM \"table\" WHERE \"id\" = $1" 1]
-         (sut/format {:select [:*] :from [:table] :where (sut/map= {:id 1})}
-                     {:quoted true :numbered true})))
-  (is (= ["SELECT \"t\".* FROM \"table\" AS \"t\" WHERE \"id\" = $1" 1]
-         (sut/format {:select [:t.*] :from [[:table :t]] :where [:= :id 1]}
-                     {:quoted true :numbered true})))
-  (is (= ["SELECT * FROM \"table\" GROUP BY \"foo\", \"bar\""]
-         (sut/format {:select [:*] :from [:table] :group-by [:foo :bar]}
-                     {:quoted true :numbered true})))
-  (is (= ["SELECT * FROM \"table\" GROUP BY DATE(\"bar\")"]
-         (sut/format {:select [:*] :from [:table] :group-by [[:date :bar]]}
-                     {:quoted true :numbered true})))
-  (is (= ["SELECT * FROM \"table\" ORDER BY \"foo\" DESC, \"bar\" ASC"]
-         (sut/format {:select [:*] :from [:table] :order-by [[:foo :desc] :bar]}
-                     {:quoted true :numbered true})))
-  (is (= ["SELECT * FROM \"table\" ORDER BY DATE(\"expiry\") DESC, \"bar\" ASC"]
-         (sut/format {:select [:*] :from [:table] :order-by [[[:date :expiry] :desc] :bar]}
-                     {:quoted true :numbered true})))
-  (is (= ["SELECT * FROM \"table\" WHERE DATE_ADD(\"expiry\", INTERVAL $1 DAYS) < NOW()" 30]
-         (sut/format {:select [:*] :from [:table] :where [:< [:date_add :expiry [:interval 30 :days]] [:now]]}
-                     {:quoted true :numbered true})))
-  (is (= ["SELECT * FROM `table` WHERE `id` = $1" 1]
-         (sut/format {:select [:*] :from [:table] :where [:= :id 1]}
-                     {:dialect :mysql :numbered true})))
-  (is (= ["SELECT * FROM \"table\" WHERE \"id\" IN ($1, $2, $3, $4)" 1 2 3 4]
-         (sut/format {:select [:*] :from [:table] :where [:in :id [1 2 3 4]]}
-                     {:quoted true :numbered true}))))
-
 ;; issue-based tests
 
 (deftest subquery-alias-263
@@ -156,12 +124,6 @@
 (deftest test-cte
   (is (= (format {:with [[:query {:select [:foo] :from [:bar]}]]})
          ["WITH query AS (SELECT foo FROM bar)"]))
-  (is (= (format {:with [[:query {:select [:foo] :from [:bar]} :materialized]]})
-         ["WITH query AS MATERIALIZED (SELECT foo FROM bar)"]))
-  (is (= (format {:with [[:query {:select [:foo] :from [:bar]} :not-materialized]]})
-         ["WITH query AS NOT MATERIALIZED (SELECT foo FROM bar)"]))
-  (is (= (format {:with [[:query {:select [:foo] :from [:bar]} :unknown]]})
-         ["WITH query AS (SELECT foo FROM bar)"]))
   (is (= (format {:with [[:query1 {:select [:foo] :from [:bar]}]
                          [:query2 {:select [:bar] :from [:quux]}]]
                   :select [:query1.id :query2.name]
@@ -176,30 +138,7 @@
                    {:values [[1 2] [4 5 6]]}]]
            :select [:*]
            :from [:static]})
-         ["WITH static (a, b, c) AS (VALUES (?, ?, NULL), (?, ?, ?)) SELECT * FROM static" 1 2 4 5 6]))
-  (testing "When the expression passed to WITH clause is a string or `ident?` the syntax of WITH clause is `with expr AS ident`"
-    (is (= (format
-             {:with   [[:ts_upper_bound "2019-08-01 15:23:00"]]
-              :select [:*]
-              :from   [:hits]
-              :where  [:= :EventDate :ts_upper_bound]})
-           ["WITH ? AS ts_upper_bound SELECT * FROM hits WHERE EventDate = ts_upper_bound" "2019-08-01 15:23:00"]))
-    (is (= (format
-             {:with   [[:ts_upper_bound :2019-08-01]]
-              :select [:*]
-              :from   [:hits]
-              :where  [:= :EventDate :ts_upper_bound]})
-           ["WITH 2019_08_01 AS ts_upper_bound SELECT * FROM hits WHERE EventDate = ts_upper_bound"])))
-  (testing "Mixing the syntax of WITH in the resulting clause"
-    (is (= (format
-             {:with   [[:ts_upper_bound "2019-08-01 15:23:00"]
-                       [:stuff {:select [:*]
-                                :from [:songs]}]]
-              :select [:*]
-              :from   [:hits :stuff]
-              :where  [:= :EventDate :ts_upper_bound]})
-           ["WITH ? AS ts_upper_bound, stuff AS (SELECT * FROM songs) SELECT * FROM hits, stuff WHERE EventDate = ts_upper_bound"
-            "2019-08-01 15:23:00"]))))
+         ["WITH static (a, b, c) AS (VALUES (?, ?, NULL), (?, ?, ?)) SELECT * FROM static" 1 2 4 5 6])))
 
 (deftest insert-into
   (is (= (format {:insert-into :foo})
@@ -551,9 +490,6 @@
 (deftest truncate-test
   (is (= ["TRUNCATE `foo`"]
          (-> {:truncate :foo}
-             (format {:dialect :mysql}))))
-  (is (= ["TRUNCATE `foo` CONTINUE IDENTITY"]
-         (-> {:truncate [:foo :continue :identity]}
              (format {:dialect :mysql})))))
 
 (deftest inlined-values-are-stringified-correctly
@@ -795,38 +731,7 @@ ORDER BY id = ? DESC
                     :values [{:name name
                               :enabled enabled}]})))))
 
-(deftest issue-425-default-values-test
-  (testing "default values"
-    (is (= ["INSERT INTO table (a, b, c) DEFAULT VALUES"]
-           (format {:insert-into [:table [:a :b :c]] :values :default}))))
-  (testing "values with default row"
-    (is (= ["INSERT INTO table (a, b, c) VALUES (1, 2, 3), DEFAULT, (4, 5, 6)"]
-           (format {:insert-into [:table [:a :b :c]]
-                    :values [[1 2 3] :default [4 5 6]]}
-                   {:inline true}))))
-  (testing "values with default column"
-    (is (= ["INSERT INTO table (a, b, c) VALUES (1, DEFAULT, 3), DEFAULT"]
-           (format {:insert-into [:table [:a :b :c]]
-                    :values [[1 [:default] 3] :default]}
-                   {:inline true}))))
-  (testing "map values with default row, no columns"
-    (is (= ["INSERT INTO table (a, b, c) VALUES (1, 2, 3), DEFAULT, (4, 5, 6)"]
-           (format {:insert-into :table
-                    :values [{:a 1 :b 2 :c 3} :default {:a 4 :b 5 :c 6}]}
-                   {:inline true}))))
-  (testing "map values with default column, no columns"
-    (is (= ["INSERT INTO table (a, b, c) VALUES (1, DEFAULT, 3), DEFAULT"]
-           (format {:insert-into :table
-                    :values [{:a 1 :b [:default] :c 3} :default]}
-                   {:inline true}))))
-  (testing "empty values"
-    (is (= ["INSERT INTO table (a, b, c) VALUES ()"]
-           (format {:insert-into [:table [:a :b :c]]
-                    :values []})))))
-
 (deftest issue-316-test
-  ;; this is a pretty naive test -- there are other tricks to perform injection
-  ;; that are not detected by HoneySQL and you should generally use :quoted true
   (testing "SQL injection via keyword is detected"
     (let [sort-column "foo; select * from users"]
       (try
@@ -884,34 +789,14 @@ ORDER BY id = ? DESC
                    {:params {:y [nil]}})))
     (is (= ["WHERE x IN (?)" nil]
            (format {:where [:in :x :?y]}
-                   {:params {:y [nil]} :checking :basic})))
-    (is (= ["WHERE x IN ($2)" nil nil]
-           (format {:where [:in :x :?y]}
-                   {:params {:y [nil]} :numbered true})))
-    (is (= ["WHERE x IN ($2)" nil nil]
-           (format {:where [:in :x :?y]}
-                   {:params {:y [nil]} :checking :basic :numbered true}))))
+                   {:params {:y [nil]} :checking :basic}))))
   (testing "IN NULL is flagged in strict mode"
     (is (thrown-with-msg? ExceptionInfo #"does not match"
                           (format {:where [:in :x [nil]]}
                                   {:checking :strict})))
     (is (thrown-with-msg? ExceptionInfo #"does not match"
                           (format {:where [:in :x :?y]}
-                                  {:params {:y [nil]} :checking :strict}))))
-  (testing "empty WHERE clauses ignored with none"
-    (is (= ["DELETE FROM foo"]
-           (format {:delete-from :foo})))
-    (is (= ["DELETE foo"]
-           (format {:delete :foo})))
-    (is (= ["UPDATE foo SET x = ?" 1]
-           (format {:update :foo :set {:x 1}}))))
-  (testing "empty WHERE clauses flagged in basic mode"
-    (is (thrown-with-msg? ExceptionInfo #"without a non-empty"
-                          (format {:delete-from :foo} {:checking :basic})))
-    (is (thrown-with-msg? ExceptionInfo #"without a non-empty"
-                          (format {:delete :foo} {:checking :basic})))
-    (is (thrown-with-msg? ExceptionInfo #"without a non-empty"
-                          (format {:update :foo :set {:x 1}} {:checking :basic})))))
+                                  {:params {:y [nil]} :checking :strict})))))
 
 (deftest quoting-:%-syntax
   (testing "quoting of expressions in functions shouldn't depend on syntax"
@@ -1031,29 +916,3 @@ ORDER BY id = ? DESC
   (is (= ["SELECT `A\"B`"]     (sut/format {:select (keyword "A\"B")} {:dialect :mysql})))
   (is (= ["SELECT `A``B`"]     (sut/format {:select (keyword "A`B")} {:dialect :mysql})))
   (is (= ["SELECT \"A\"\"B\""] (sut/format {:select (keyword "A\"B")} {:dialect :oracle}))))
-
-(deftest issue-421-mysql-replace-into
-  ;; because the :mysql dialect registers a new clause, and we've probably already run
-  ;; tests with that dialect, we can't test that :replace-into throws an exception when
-  ;; no :dialect is specified because the clause might already be in place:
-  (is (= ["INSERT INTO table VALUES (?, ?, ?)" 1 2 3]
-         (sut/format {:insert-into :table :values [[1 2 3]]})))
-  (is (= ["REPLACE INTO table VALUES (?, ?, ?)" 1 2 3]
-         (sut/format {:replace-into :table :values [[1 2 3]]}
-                     {:dialect :mysql :quoted false}))))
-
-(deftest issue-422-quoting
-  ;; default quote if strange entity:
-  (is (= ["SELECT A, \"B C\""] (sut/format {:select [:A (keyword "B C")]})))
-  ;; default don't quote normal entity:
-  (is (= ["SELECT A, B_C"]     (sut/format {:select [:A (keyword "B_C")]})))
-  ;; quote all entities when quoting enabled:
-  (is (= ["SELECT \"A\", \"B C\""] (sut/format {:select [:A (keyword "B C")]}
-                                               {:quoted true})))
-  ;; don't quote if quoting disabled (illegal SQL):
-  (is (= ["SELECT A, B C"]     (sut/format {:select [:A (keyword "B C")]}
-                                           {:quoted false}))))
-
-(deftest issue-434-case-quoting
-  (is (= ["SELECT ARRAY (SELECT \"oid\" FROM \"pg_proc\" WHERE \"proname\" LIKE 'bytea%')"]
-         (sut/format {:select [[[:'ARRAY {:select :oid :from :pg_proc :where [:like :proname [:inline "bytea%"]]}]]]} :quoted true))))



View it on GitLab: https://salsa.debian.org/clojure-team/honeysql-clojure/-/commit/a37238846d842a0a4adc38faf9812861d9224ed8

-- 
View it on GitLab: https://salsa.debian.org/clojure-team/honeysql-clojure/-/commit/a37238846d842a0a4adc38faf9812861d9224ed8
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20230112/fe285e4c/attachment.htm>


More information about the pkg-java-commits mailing list