zensols.cisql.db-access
Layer between the application and JDBC. It also makes calls to print and display result sets.
configure-db-access
(configure-db-access)
Add the JVM level signal handler and other resources.
db-id-format
(db-id-format & {:keys [user? only-url?], :or {user? true}})
Get a string formatted for the DB.
display-results
(display-results data header title)
Display results either in text or as a graphical swing table.
execute-query
(execute-query query)
(execute-query query query-handler-fn)
Execute SQL query on the JDBC driver using function query-handler-fn to process the results. If query-handler-fn is not given then print or display the results in the GUI frame.
result-set-to-array
(result-set-to-array rs & opts)
Return result set rs as an array of rows and column names.
Return a map with entries: * header: the column header data * rows: a lazy list of maps each representing a row from the result set.
See slurp-result-set for definition of opts.
show-table-metadata
(show-table-metadata)
(show-table-metadata table)
Display the meta data of table, which includes column names and metadata.
slurp-result-set
(slurp-result-set rs meta & {:keys [convert-fn], :or {convert-fn (fn* [p1__5677# p2__5678#] (.getObject p1__5677# p2__5678#))}})
Return a lazy list of maps representing result set rs with table metadata meta.
If key :convert-fn is non-nil then use it to get the value on the result set. The default calls .getObject
.