From: Russ Tyndall Date: Tue, 26 Jan 2010 21:13:38 +0000 (-0500) Subject: fixed a bug in parsing column types from sqlite3 databases by adding a trim X-Git-Tag: v4.3.3~14 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=b20e411ae9adfae42e8b8cf6277a4f9f0c672816 fixed a bug in parsing column types from sqlite3 databases by adding a trim --- diff --git a/db-sqlite3/sqlite3-sql.lisp b/db-sqlite3/sqlite3-sql.lisp index 90f0812..1ba6b0b 100644 --- a/db-sqlite3/sqlite3-sql.lisp +++ b/db-sqlite3/sqlite3-sql.lisp @@ -281,14 +281,16 @@ (database sqlite3-database) &key (owner nil)) (declare (ignore owner)) + (loop for field-info in (sqlite3-table-info table database) when (string= attribute (second field-info)) return (let* ((raw-type (third field-info)) (start-length (position #\( raw-type)) - (type (if start-length - (subseq raw-type 0 start-length) - raw-type)) + (type (string-trim '(#\space #\tab #\newline) + (if start-length + (subseq raw-type 0 start-length) + raw-type))) (length (if start-length (parse-integer (subseq raw-type (1+ start-length)) :junk-allowed t)