summaryrefslogtreecommitdiffstats
path: root/rdms.scm
diff options
context:
space:
mode:
authorJames LewisMoss <dres@debian.org>1999-12-06 19:32:57 -0500
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:28 -0800
commitc394920caedf3dac1981bb6b10eeb47fd6e4bb21 (patch)
treef21194653a3554f747dde3df908df993c48db5a0 /rdms.scm
parent926b1b647ac830660933a5e63eb52d4a2552e264 (diff)
parentbd9733926076885e3417b74de76e4c9c7bc56254 (diff)
downloadslib-6ae63d86d3d60068cc7edaeadc9912b84880086b.tar.gz
slib-6ae63d86d3d60068cc7edaeadc9912b84880086b.zip
Import Debian changes 2c7-1debian/2c7-1
slib (2c7-1) unstable; urgency=low * New upstream. * Add slibconfig back in. slib (2c6-2) unstable; urgency=low * Remove the slib$(VERSION).info file. Cut the diff back down to size. slib (2c6-1) unstable; urgency=low * New upstream. * Move docs to /usr/share. Up standards version. add /usr/doc symlink. Move info files. Remove undocumented link. slib (2c5-6) unstable; urgency=low * Lowercase two vars in yasyn.scm (Fixes bug #37222) slib (2c5-5) unstable; urgency=low * Fix it so string-index isn't defined (now there is a strsrch:string-index) (Fixes #38812) slib (2c5-4) unstable; urgency=low * Don't run slibconfig in postinst. (Fixes bug #38253, #37733, #37715, #37746, #37809, #37917, #38123, #38462) slib (2c5-3) unstable; urgency=low * Run slibconfig in postinst. It was commented out there, but I don't see any old bug reports on why it was commented out, so let's try again. :) (Fixes bug #37221) slib (2c5-2) unstable; urgency=low * Link mklibcat.scm to mklibcat. Fixes a problem with using slib with guile. slib (2c5-1) unstable; urgency=low * New upstream. slib (2c3-4) unstable; urgency=low * New maintainer.
Diffstat (limited to 'rdms.scm')
-rw-r--r--rdms.scm42
1 files changed, 23 insertions, 19 deletions
diff --git a/rdms.scm b/rdms.scm
index 9f176f9..e0dbd3c 100644
--- a/rdms.scm
+++ b/rdms.scm
@@ -79,6 +79,7 @@
(not (negative? x))))
integer
#f)
+ (number #f number? number #f)
(expression #f #f expression #f)
(boolean #f boolean? boolean #f)
(symbol #f symbol? symbol #f)
@@ -252,6 +253,7 @@
(primary-limit 1)
(column-name-alist '())
(column-foreign-list '())
+ (column-foreign-check-list '())
(column-domain-list '())
(column-type-list '())
(export-alist '())
@@ -283,24 +285,26 @@
(set! column-domain-list
(cons column-domain column-domain-list))
(set! column-foreign-list
- (cons
- (let ((foreign-name
- (row-ref dom:row domains:foreign-pos)))
- (cond
- ((or (not foreign-name)
- (eq? foreign-name table-name)) #f)
- (else
- (let* ((tab (open-table foreign-name #f))
- (p? (and tab (tab 'get 1))))
- (cond
- ((not tab)
- (rdms:error "foreign key table missing for:"
- foreign-name))
- ((not (= (tab 'primary-limit) 1))
- (rdms:error "foreign key table wrong type:"
- foreign-name))
- (else p?))))))
- column-foreign-list))))
+ (cons (let ((foreign-name
+ (row-ref dom:row domains:foreign-pos)))
+ (and (not (eq? foreign-name table-name))
+ foreign-name))
+ column-foreign-list))
+ (set! column-foreign-check-list
+ (cons
+ (let ((foreign-name (car column-foreign-list)))
+ (and foreign-name
+ (let* ((tab (open-table foreign-name #f))
+ (p? (and tab (tab 'get 1))))
+ (cond
+ ((not tab)
+ (rdms:error "foreign key table missing for:"
+ foreign-name))
+ ((not (= (tab 'primary-limit) 1))
+ (rdms:error "foreign key table wrong type:"
+ foreign-name))
+ (else p?)))))
+ column-foreign-check-list))))
(else
(rdms:error "missing domain for column:" ci column-name)))
(cond
@@ -409,7 +413,7 @@
(rdms:error "foreign key missing:"
table-name column-name value))))
cirs dirs row column-name-alist column-domain-list
- column-foreign-list)
+ column-foreign-check-list)
(cond ((and uir (not (uir row)))
(rdms:error "violated user integrity rule:"
row)))))