X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-sqlite3%2Fsqlite3-sql.lisp;h=c51a5431890be950648ba442c0dd3c14072b9516;hb=refs%2Ftags%2Fv5.0.1;hp=90f08120d2895898719235cc85b2e262fc824395;hpb=e567409d9fff3f7231c2a0bb69b345e19de2b246;p=clsql.git diff --git a/db-sqlite3/sqlite3-sql.lisp b/db-sqlite3/sqlite3-sql.lisp index 90f0812..c51a543 100644 --- a/db-sqlite3/sqlite3-sql.lisp +++ b/db-sqlite3/sqlite3-sql.lisp @@ -7,8 +7,6 @@ ;;;; Authors: Aurelio Bignoli ;;;; Created: Oct 2004 ;;;; -;;;; $Id$ -;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2004 by Aurelio Bignoli ;;;; ;;;; CLSQL users are granted the rights to distribute and use this software @@ -281,14 +279,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 clsql-sys::+whitespace-chars+ + (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)