The Artima Developer Community
Sponsored Link

Python Buzz Forum
lsqlite3 - Common Lisp SQLite3 interface

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ng Pheng Siong

Posts: 410
Nickname: ngps
Registered: Apr, 2004

Ng Pheng Siong is just another guy with a website.
lsqlite3 - Common Lisp SQLite3 interface Posted: Oct 28, 2004 9:18 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Ng Pheng Siong.
Original Post: lsqlite3 - Common Lisp SQLite3 interface
Feed Title: (render-blog Ng Pheng Siong)
Feed URL: http://sandbox.rulemaker.net/ngps/rdf10_xml
Feed Description: Just another this here thing blog.
Latest Python Buzz Posts
Latest Python Buzz Posts by Ng Pheng Siong
Latest Posts From (render-blog Ng Pheng Siong)

Advertisement
CL-USER> (lsqlite3:connect "/tmp/xx.db")
#<LSQLITE3::SQLITE3-CONNECTION {483CB20D}>
CL-USER> (lsqlite3:exec "select * from sqlite_master")
(("table" "a" "a" "2" "CREATE TABLE a (ak int, av int)"))
CL-USER> (lsqlite3:exec "select * from a")
(("1" "1"))
CL-USER> (lsqlite3:disconnect)
T
CL-USER> 

This is my old UncommonSQL-SQLite2 interface adapted to SQLite3.

SQLite version 2 stores all data as ASCII text. Version 3 introduces manifest typing and comes with a large number of API functions to grok data into the right type.

Notice the LSQLITE3 code above returns the data as ("1" "1") even though the database schema says both values should be integers. ;-) I may or may not support SQLite 3's manifest typing functions in LSQLITE3 because my intention is to play with prevalence using SQLite as the underlying transaction log storage: The stuff I'm going to store will be serialised Common Lisp objects; I think they can all be blobs.

BTW, CL-SQL comes with SQLite2 support. It probably won't take much effort to get to SQLite3 from there. Data is still all text, though, I believe.

Read: lsqlite3 - Common Lisp SQLite3 interface

Topic: A tad of TADS [2]: decorations Previous Topic   Next Topic Topic: DDoS

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use