projects
/
clsql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a0fcaf1
)
fixed a bug in parsing column types from sqlite3 databases by adding a trim
author
Russ Tyndall
<russ@acceleration.net>
Tue, 26 Jan 2010 21:13:38 +0000
(16:13 -0500)
committer
Nathan Bird
<nathan@acceleration.net>
Tue, 26 Jan 2010 21:26:11 +0000
(16:26 -0500)
db-sqlite3/sqlite3-sql.lisp
patch
|
blob
|
history
diff --git
a/db-sqlite3/sqlite3-sql.lisp
b/db-sqlite3/sqlite3-sql.lisp
index 90f08120d2895898719235cc85b2e262fc824395..1ba6b0ba68649deee35d6a367d1b9bc826095f08 100644
(file)
--- 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))
(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))
(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)
(length (if start-length
(parse-integer (subseq raw-type (1+ start-length))
:junk-allowed t)