From dc9f3745707c37c0efb24f1d07e10c6023b25dfd Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sat, 27 Sep 2008 14:30:12 -0500 Subject: [PATCH] sort of support foreign keys --- basis/db/sqlite/sqlite.factor | 1 + basis/db/tuples/tuples-tests.factor | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/basis/db/sqlite/sqlite.factor b/basis/db/sqlite/sqlite.factor index e520ad302b..0c4ce4717f 100755 --- a/basis/db/sqlite/sqlite.factor +++ b/basis/db/sqlite/sqlite.factor @@ -171,6 +171,7 @@ M: sqlite-db persistent-table ( -- assoc ) { +db-assigned-id+ { "integer" "integer" f } } { +user-assigned-id+ { f f f } } { +random-id+ { "integer" "integer" f } } + { +foreign-id+ { "integer" "integer" f } } { INTEGER { "integer" "integer" f } } { BIG-INTEGER { "bigint" "bigint" } } { SIGNED-BIG-INTEGER { "bigint" "bigint" } } diff --git a/basis/db/tuples/tuples-tests.factor b/basis/db/tuples/tuples-tests.factor index ddaee012a5..b3d1b2bbef 100755 --- a/basis/db/tuples/tuples-tests.factor +++ b/basis/db/tuples/tuples-tests.factor @@ -210,12 +210,10 @@ TUPLE: annotation n paste-id summary author mode contents ; [ ] [ paste drop-table ] unit-test [ ] [ paste create-table ] unit-test [ ] [ annotation create-table ] unit-test - ; -! [ test-paste-schema ] test-sqlite -! [ test-paste-schema ] test-postgresql - +[ test-paste-schema ] test-sqlite +[ test-paste-schema ] test-postgresql : test-repeated-insert [ ] [ person ensure-table ] unit-test