Siag Office

Shohei Mail

Webresolve

Pen

Dwatch

XMagick

Myhtml

Simple Database Library

Sdbsiod

mod_log_sdb

mod_sql_sdb

Sdbgrey

Ulric's Router Construction Kit

neXtaw

Mowitz

Kylie

O3read

Ucron

Parsecgi

Mr Big


Ulric's stuff

 

Sdbsiod


Sdbsiod is a version of George Carrette's Siod Scheme interpreter
with database support through the sdb library. Siod is used by
Siag Office and the Gimp, for example.

Download sdbsiod here:
http://siag.nu/pub/sdbsiod/

Download the sdb library here:
http://siag.nu/libsdb/

Download siod here:
http://people.delphiforums.com/gjc/siod.html

It adds the following functions:

(sdb_init)
(sdb_open url)
(sdb_close id)
(sdb_query url callback closure)

These functions are more or less equivalent to their
C counterparts. See the sdb manpage for details.

See sdb.c in this directory for even more details. This file
contains all the meat and can be added to pretty much any
Siod application with minimal effort.


Example, using the sqlite3 database driver:

ulric@lifebook:~/Projekt/sdbsiod$ ./sdbsiod
Welcome to SIOD, Scheme In One Defun, Version 3.5 5-MAY-97
(C) Copyright 1988-1994 Paradigm Associates Inc.
2 heaps. size = 5000 cells, 60000 bytes. 256 inums. GC is mark and sweep
> (define (mycb n p closure) (print p) 0)
Evaluation took 0 seconds (0 in gc) 7 cons work, 2.70749e-05 real.
#
> (sdb_query "sqlite3:db=test" "create table b (a integer, b integer)" mycb nil)
Evaluation took 0.01 seconds (0 in gc) 1 cons work, 0.485998 real.
0
> (define url "sqlite3:db=test")
Evaluation took -4.1674e-19 seconds (0 in gc) 0 cons work, 5.05184e-06 real.
"sqlite3:db=test"
> (sdb_query url "insert into b values (1, 2)" mycb nil)
Evaluation took -4.1674e-19 seconds (0 in gc) 1 cons work, 0.2013 real.
0
> (sdb_query url "insert into b select * from b" mycb nil)
Evaluation took -4.1674e-19 seconds (0 in gc) 1 cons work, 0.188843 real.
0
> (sdb_query url "insert into b select * from b" mycb nil)
Evaluation took 0.01 seconds (0 in gc) 1 cons work, 0.199451 real.
0
> (sdb_query url "insert into b select * from b" mycb nil)
Evaluation took 1.10961e-18 seconds (0 in gc) 1 cons work, 0.00448691 real.
0
> (sdb_query url "insert into b select * from b" mycb nil)
Evaluation took 0.01 seconds (0 in gc) 1 cons work, 0.00440291 real.
0
> (sdb_query url "insert into b select * from b" mycb nil)
Evaluation took 0.01 seconds (0 in gc) 1 cons work, 0.00490511 real.
0
> (sdb_query url "insert into b select * from b" mycb nil)
Evaluation took -2.77488e-18 seconds (0 in gc) 1 cons work, 0.00474304 real.
0
> (sdb_query url "select count(*) from b" mycb nil)
("64")
Evaluation took -2.77488e-18 seconds (0 in gc) 8 cons work, 0.000944078 real.
1


More example code can be found on the example.scm script.

AUTHORS
COPYING
ChangeLog
INSTALL
Makefile
example.scm
sdb.c
siod.c
                                                                                                                                                                                                                                                                               
 

Valid HTML 4.01! Powered By ...?
Google