From cda578be8efad26420dddcf1d9a3a018e0c48c0c Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sat, 23 Oct 2010 15:56:24 +0400 Subject: [PATCH] Add a high-level wrapper for sqlite3_clear_bindings. --- sqlite.lisp | 8 ++++++++ 1 file changed, 8 insertions(+) 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: -- 2.11.4.GIT