From d7adfc9d5ce615bc5dd332543978807e06f82859 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Wed, 8 Jul 2020 23:03:14 -0700 Subject: [PATCH] Document #121 in friendly SQL functions --- doc/friendly-sql-functions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/friendly-sql-functions.md b/doc/friendly-sql-functions.md index 1a8427b..f50db0e 100644 --- a/doc/friendly-sql-functions.md +++ b/doc/friendly-sql-functions.md @@ -196,7 +196,9 @@ These quoting functions can be provided to any of the friendly SQL functions abo (sql/insert! ds :my-table {:some "data"} {:table-fn snake-case}) ``` -Note that the entity naming function is passed a string, the result of calling `name` on the keyword passed in. Also note that the default quoting functions do not handle schema-qualified names, such as `dbo.table_name` -- `sql-server` would produce `[dbo.table_name]` from that. Use the `schema` function to wrap the quoting function if you need that behavior, e.g,. `{:table-fn (schema sql-server)}` which would produce `[dbo].[table_name]`. +If you have [camel-snake-kebab](https://clj-commons.org/camel-snake-kebab/) on your classpath, `next.jdbc` will contain `snake-kebab-opts` and `unqualified-snake-kebab-opts` which are hash maps containing `:column-fn` and `:table-fn` that use the `->snake_case` function from that library which performs a more sophisticated transformation. + +> Note: The entity naming function is passed a string, the result of calling `name` on the keyword passed in. Also note that the default quoting functions do not handle schema-qualified names, such as `dbo.table_name` -- `sql-server` would produce `[dbo.table_name]` from that. Use the `schema` function to wrap the quoting function if you need that behavior, e.g,. `{:table-fn (schema sql-server)}` which would produce `[dbo].[table_name]`. ## HugSQL Quick Start