cavm.statement

->PStatement

(->PStatement stmt execute)
Positional factory function for class cavm.statement.PStatement.

cached-statement

(cached-statement stmt-str result?)
Utility to cache a prepared statement, per-connection.  Returns a function
that will execute the <stmt-str> as a prepared statement on the given
connection. The prepared statement will be cached for reuse on the same
connection. When a connection is destroyed, any statement cached here is disposed.

This is different from c3p0 statement caching, which hashes every query, and
looks for a cached prepared statement. This has been slow in our performance
tests, and will deadlock if the prepared statement ends up creating another
prepared statement (i.e. via a sql function call).

map->PStatement

(map->PStatement m__6289__auto__)
Factory function for class cavm.statement.PStatement, taking a map of keywords to field values.

sql-stmt

(sql-stmt conn stmt-str & args)
Return a prepared statement which can participate in with-open.

sql-stmt-result

(sql-stmt-result conn stmt-str & args)
Return a prepared statement which returns a result set,
and can participate in with-open.