From: Alexander Gavrilov Date: Sat, 23 Oct 2010 11:56:24 +0000 (+0400) Subject: Add a high-level wrapper for sqlite3_clear_bindings. X-Git-Tag: 0.2~7 X-Git-Url: https://repo.or.cz/w/cl-sqlite.git/commitdiff_plain/cda578be8efad26420dddcf1d9a3a018e0c48c0c Add a high-level wrapper for sqlite3_clear_bindings. --- diff --git a/sqlite.lisp b/sqlite.lisp index caa7d40..af54377 100644 --- a/sqlite.lisp +++ b/sqlite.lisp @@ -15,6 +15,7 @@ :finalize-statement :step-statement :reset-statement + :clear-statement-bindings :statement-column-value :statement-column-names :statement-bind-parameter-names @@ -193,6 +194,13 @@ Returns T is successfully advanced to the next row and NIL if there are no more (unless (eq error-code :ok) (sqlite-error error-code "Error while resetting an sqlite statement." :statement statement)))) +(defun clear-statement-bindings (statement) + "Sets all binding values to NULL." + (let ((error-code (sqlite-ffi:sqlite3-clear-bindings (handle statement)))) + (unless (eq error-code :ok) + (sqlite-error error-code "Error while clearing bindings of an sqlite statement." + :statement statement)))) + (defun statement-column-value (statement column-number) "Returns the COLUMN-NUMBER-th column's value of the current row of the STATEMENT. Columns are numbered from zero. Returns: