High level sql toolkit for Clojure
High level sql toolkit for Clojure
(apply-atomic & args)
Apply a function in a transaction.
Apply a function in a transaction.
(atomic ctx & body)
Convenience macro for execute a computation in a transaction or subtransaction.
Convenience macro for execute a computation in a transaction or subtransaction.
(atomic-apply & args)
Deprecated alias for apply-atomic
.
Deprecated alias for `apply-atomic`.
(context dbspec)
(context dbspec opts)
Context constructor.
Context constructor.
(cursor->lazyseq cursor)
(cursor->lazyseq cursor opts)
Transform a cursor in a lazyseq.
The returned lazyseq will return values until a cursor is closed or all values are fetched.
Transform a cursor in a lazyseq. The returned lazyseq will return values until a cursor is closed or all values are fetched.
(execute q)
(execute ctx q)
Execute a query and return a number of rows affected.
Execute a query and return a number of rows affected.
(fetch q)
(fetch ctx q)
(fetch ctx q opts)
Fetch eagerly results executing a query.
This function returns a vector of records (default) or rows (depending on specified opts). Resources are relased inmediatelly without specific explicit action for it.
Fetch eagerly results executing a query. This function returns a vector of records (default) or rows (depending on specified opts). Resources are relased inmediatelly without specific explicit action for it.
(fetch-lazy ctx q)
(fetch-lazy ctx q opts)
Fetch lazily results executing a query.
This function returns a cursor instead of result. You should explicitly close the cursor at the end of iteration for release resources.
Fetch lazily results executing a query. This function returns a cursor instead of result. You should explicitly close the cursor at the end of iteration for release resources.
(load-into ctx tablename data)
(load-into ctx tablename data opts)
Load data into a table. Supports csv and json formats.
Load data into a table. Supports csv and json formats.
(query ctx querylike)
Mark a query for reuse the prepared statement.
This function should be used with precaution and close method should be called when query is not longer needed. In almost all cases you should not need use this function.
Mark a query for reuse the prepared statement. This function should be used with precaution and close method should be called when query is not longer needed. In almost all cases you should not need use this function.
(set-rollback! ctx)
Mark current transaction for rollback.
This function is not safe and it not aborts the execution of current function, it only marks the current transaction for rollback.
Mark current transaction for rollback. This function is not safe and it not aborts the execution of current function, it only marks the current transaction for rollback.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close