Details
-
Type:
Enhancement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Patch:Code
Description
Following the following discussion:
https://groups.google.com/d/topic/clojure/j7fXdkFMrec/discussion
I've implemented a simple stropping feature that also provide a way to supply qualified identifiers and a function (as-identifier) that can be reused in user code. The implementation can be found there:
https://github.com/budu/java.jdbc/commit/0822d323cd4d267533a88241be68cb184ff9bf28
It's also attached to this issue.
Here's some example of how that feature could be used:
user> (create-table :foo [:bar :integer] [:baz :text])
"CREATE TABLE foo (bar integer, baz text)"
user> (create-table [:schema :foo] [:bar :integer] [:baz :text])
"CREATE TABLE schema.foo (bar integer, baz text)"
user> (with-stropping \" identity (create-table [:schema :foo] [:bar :integer] [:baz :text]))
"CREATE TABLE \"schema\".\"foo\" (\"bar\" integer, \"baz\" text)"
user> (with-stropping [[ ]] identity (create-table [:schema :foo] [:bar :integer] [:baz :text]))
"CREATE TABLE [schema].[foo] ([bar] integer, [baz] text)"
Attachments
Activity
| Field | Original Value | New Value |
|---|---|---|
| Project | Clojure [ 10010 ] | java.jdbc [ 10021 ] |
| Key | CLJ-778 |
|
| Affects Version/s | Release.Next [ 10038 ] |
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Completed [ 1 ] |