projects
/
clsql.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r9035: add odbc interface
[clsql.git]
/
db-sqlite
/
sqlite-sql.lisp
diff --git
a/db-sqlite/sqlite-sql.lisp
b/db-sqlite/sqlite-sql.lisp
index 9b67f380b25cc7f9a1f35a9b3e69e23eedc2e0a0..1f3c15855ffdbdd1b16c8ae063ec2fe8488bce40 100644
(file)
--- a/
db-sqlite/sqlite-sql.lisp
+++ b/
db-sqlite/sqlite-sql.lisp
@@
-41,6
+41,8
@@
(handler-case
(make-instance 'sqlite-database
:name (database-name-from-spec connection-spec :sqlite)
(handler-case
(make-instance 'sqlite-database
:name (database-name-from-spec connection-spec :sqlite)
+ :database-type :sqlite
+ :connection-spec connection-spec
:sqlite-db (sqlite:sqlite-open (first connection-spec)))
(sqlite:sqlite-error (err)
(error 'clsql-connect-error
:sqlite-db (sqlite:sqlite-open (first connection-spec)))
(sqlite:sqlite-error (err)
(error 'clsql-connect-error
@@
-296,7
+298,9
@@
(defmethod database-probe (connection-spec (type (eql :sqlite)))
(destructuring-bind (name) connection-spec
(defmethod database-probe (connection-spec (type (eql :sqlite)))
(destructuring-bind (name) connection-spec
- ;; TODO: Add a test that this file is a real sqlite database
- (and (probe-file name) t)))
+ ;; TODO: Add a test that this file is a real sqlite database
+ (or (string-equal ":memory:" name)
+ (and (probe-file name) t))))
+