(check-defsql open-connection sqlfn)
Checks a query by creating a Postgres prepared statement. This prepares (then deallocates) a statement in the Postgres session. In preparing, postgres performs analysis on the statement in order to make it execute faster when called--this analysis will throw an error if the SQL is incorrect, has invalid references, or has parameters bound to the wrong type. Basically this is a very good sanity check. (Note: the postgres JDBC driver uses prepared statements under the hood of a JDBC PreparedStatement, after a threshold of executions.)
Checks a query by creating a Postgres prepared statement. This prepares (then deallocates) a statement in the Postgres session. In preparing, postgres performs analysis on the statement in order to make it execute faster when called--this analysis will throw an error if the SQL is incorrect, has invalid references, or has parameters bound to the wrong type. Basically this is a very good sanity check. (Note: the postgres JDBC driver uses prepared statements under the hood of a JDBC PreparedStatement, after a threshold of executions.)
(defsql-tests open-connection ns)
Creates a test for each function generated by defsql in the namespace.
Creates a test for each function generated by defsql in the namespace.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close