make postgresql pass unit tests
parent
fa162d843f
commit
3fcac9bd3d
extra/db/tuples
|
@ -67,8 +67,8 @@ person "PERSON"
|
|||
"billy" 10 3.14 <person> the-person1 set
|
||||
"johnny" 10 3.14 <person> the-person2 set
|
||||
|
||||
test-sqlite
|
||||
! test-postgresql
|
||||
! test-sqlite
|
||||
test-postgresql
|
||||
|
||||
person "PERSON"
|
||||
{
|
||||
|
@ -81,8 +81,8 @@ person "PERSON"
|
|||
1 "billy" 10 3.14 <assigned-person> the-person1 set
|
||||
2 "johnny" 10 3.14 <assigned-person> 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 ;
|
||||
|
|
|
@ -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 <insert-native-statement> [
|
||||
|
|
Loading…
Reference in New Issue