Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local Database with Scheme

I want to construct a local database for my program which has to be filled with user preffered settings, searched websites and so on.

But what i could find on internet(google and this website) is just about a database from a server or local database with a specific dialects, exclusive racket which is the most popular of all scheme dialects.

Here are the informations from racket documentation for database:

Web Applications in scheme

Using Database connectivity

As far as i see, there is no information or no example about using a local database with racket.

Can anybody give a small example to construct and to use a local database with scheme (racket) ?

like image 270
Asqan Avatar asked Mar 15 '13 18:03

Asqan


1 Answers

SQLite uses local database files:

(require db)
(define c (sqlite3-connect #:database "path/to/db-file" #:mode 'create)

The racket db docs assume you already know how to use the database system, so first read the SQLite docs. Then read the racket db docs to find out how to send SQL commands to the SQLite database.

like image 52
Ryan Culpepper Avatar answered Sep 18 '22 04:09

Ryan Culpepper