source: project/release/4/jbogenturfahi/trunk/db.scm @ 22226

Last change on this file since 22226 was 22226, checked in by Alan Post, 10 years ago

jbogenturfa'i: .i cipra zo'e lo ro gismu

Insert all gismu into the database and run the list through the
parser, making sure they are all recognized as gismu.

File size: 2.1 KB
Line 
1;;;;
2;;;; jbogenturfahi - lo lojbo ke pe'a jajgau ratcu ke'e genturfa'i
3;;;;               `-> A Lojban grammar parser
4;;;;
5;;;; Copyright (c) 2010 ".alyn.post." <alyn.post@lodockikumazvati.org>
6;;;;
7;;;; Permission to use, copy, modify, and/or distribute this software for any
8;;;; purpose with or without fee is hereby granted, provided that the above
9;;;; copyright notice and this permission notice appear in all copies.
10;;;;
11;;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12;;;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13;;;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14;;;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15;;;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16;;;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17;;;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18;;;;
19
20(define jbogenturfahi-db (sql:open (jbogenturfahi-db-file)))
21
22(define (cmavo:drop-table)
23  (sql:drop-table jbogenturfahi-db #<<EOS
24drop table if exists cmavo;
25EOS
26))
27
28(define (gismu:drop-table)
29  (sql:drop-table jbogenturfahi-db #<<EOS
30drop table if exists gismu;
31EOS
32))
33
34(define (cmavo:create-table)
35  (sql:create-table jbogenturfahi-db #<<EOS
36create table if not exists
37cmavo(valsi varchar(9) primary key,
38      selmaho varchar(6) not null,
39      series int);
40EOS
41))
42
43(define (gismu:create-table)
44  (sql:create-table jbogenturfahi-db #<<EOS
45create table if not exists
46gismu(valsi varchar(5) primary key);
47EOS
48))
49
50(define (cmavo:gen-insert)
51  (sql:gen-insert jbogenturfahi-db #<<EOS
52insert into cmavo('valsi', 'selmaho', 'series')
53values(?, ?, ?);
54EOS
55))
56
57(define (gismu:gen-insert)
58  (sql:gen-insert jbogenturfahi-db #<<EOS
59insert into gismu('valsi')
60values(?);
61EOS
62))
63
64(define (cmavo:gen-select-list)
65  (sql:gen-select-list jbogenturfahi-db #<<EOS
66select   selmaho,
67         valsi
68from     cmavo
69order by valsi
70EOS
71))
72
73(define (gismu:gen-select-list)
74  (sql:gen-select-list jbogenturfahi-db #<<EOS
75select   valsi
76from     gismu
77order by valsi
78EOS
79))
Note: See TracBrowser for help on using the repository browser.