The engine receives SQL strings and execution options, executes the statements, and returns the results.
The eventual intent is to support multiple execution environments with a similar interface.
But for now, seaquell simply uses clojure.java.jdbc.
exec FunctionTo do its job, exec tries to figure out whether the statement returns results or not.
Most of the time it can do that by just looking at the SQL string.
For statements with leading with clauses, however, exec would basically have to parse the SQL to call the right function.
Instead, it relies on two additional checks.
First, it uses the select? and compound-select? predicate functions from the seaquell.utility namespace.
Those functions depend on one design detail of seaquell: SQL statements are maps with a :sql-stmt key to indicate their type.
Next, is looks at the :jdbc/query? option, which lets the caller direct which function to call.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |