zensols.cisql.db-access

Layer between the application and JDBC. It also makes calls to print and display result sets.

assert-connection

(assert-connection)

configure-db-access

(configure-db-access)

Add the JVM level signal handler and other resources.

connected?

(connected?)

db-id-format

(db-id-format & {:keys [user? only-url?], :or {user? true}})

Get a string formatted for the DB.

db-spec

(db-spec)

dbspec-meta-data

(dbspec-meta-data)

display-results

(display-results data header title)

Display results either in text or as a graphical swing table.

See zensols.cisql.db-access/display-result-set.

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.

orphan-frame

(orphan-frame)(orphan-frame label)

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.

set-db-spec

(set-db-spec spec)

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.