16 Jul 19:38
sqlite
From: w r <wrloan2000 <at> yahoo.com>
Subject: sqlite
Newsgroups: gmane.lisp.scheme.bigloo
Date: 2008-07-16 17:41:59 GMT
Expires: This article expires on 2008-07-30
Subject: sqlite
Newsgroups: gmane.lisp.scheme.bigloo
Date: 2008-07-16 17:41:59 GMT
Expires: This article expires on 2008-07-30
I'm experimenting with the sqlite interface (bigloo 3.1a on linux), and ran into 2 issues:
1) This code gets an error parsing the '1.234' value field:
(module sql
(library sqlite)
(main main))
(delete-file "test.db")
(define *db* (instantiate::sqlite (path "test.db")))
(define (main args)
(sqlite-exec *db* "CREATE TABLE table1 (id INTEGER, name TEXT, value REAL)")
(sqlite-exec *db* "INSERT INTO table1 (id, name) VALUES (1, 'first')")
(pp (sqlite-map *db* vector "SELECT * FROM table1"))
;; prints (#("1" "first" #unspecified))
(sqlite-exec *db* "INSERT INTO table1 (id, name, value) VALUES (2, 'second', 1.234)")
(pp (sqlite-map *db* vector "SELECT * FROM table1"))
;; *** ERROR:parser:
;; parse error (unexpected token `DOT') -- (DOT #{loc [string] 60})
)
2) The databases I create using bigloo aren't recognized by sqlite3. I get:
$ sqlite3 test.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> .tables
Error: file is encrypted or is not a database
(Continue reading)
RSS Feed