diff --git a/extra/db/tuples/tuples-tests.factor b/extra/db/tuples/tuples-tests.factor index c9e6d302e0..83b814378b 100755 --- a/extra/db/tuples/tuples-tests.factor +++ b/extra/db/tuples/tuples-tests.factor @@ -67,8 +67,8 @@ person "PERSON" "billy" 10 3.14 the-person1 set "johnny" 10 3.14 the-person2 set -test-sqlite -! test-postgresql +! test-sqlite +test-postgresql person "PERSON" { @@ -81,8 +81,8 @@ person "PERSON" 1 "billy" 10 3.14 the-person1 set 2 "johnny" 10 3.14 the-person2 set -test-sqlite -! test-postgresql +! test-sqlite +test-postgresql TUPLE: paste n summary author channel mode contents timestamp annotations ; TUPLE: annotation n paste-id summary author mode contents ; diff --git a/extra/db/tuples/tuples.factor b/extra/db/tuples/tuples.factor index 28556a13fa..96c171c96f 100755 --- a/extra/db/tuples/tuples.factor +++ b/extra/db/tuples/tuples.factor @@ -63,10 +63,14 @@ HOOK: insert-tuple* db ( tuple statement -- ) : sql-props ( class -- columns table ) dup db-columns swap db-table ; +: with-disposals ( seq quot -- ) + [ with-disposal ] curry each ; + : create-table ( class -- ) - create-sql-statement [ execute-statement ] with-disposal ; + create-sql-statement [ execute-statement ] with-disposals ; + : drop-table ( class -- ) - drop-sql-statement [ execute-statement ] with-disposal ; + drop-sql-statement [ execute-statement ] with-disposals ; : insert-native ( tuple -- ) dup class [