fix with-disposals to work on seq or obj
parent
5caf407517
commit
eb8207a784
|
@ -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 ;
|
||||
|
|
|
@ -64,7 +64,11 @@ HOOK: insert-tuple* db ( tuple statement -- )
|
|||
dup db-columns swap db-table ;
|
||||
|
||||
: with-disposals ( seq quot -- )
|
||||
[ with-disposal ] curry each ;
|
||||
over sequence? [
|
||||
[ with-disposal ] curry each
|
||||
] [
|
||||
with-disposal
|
||||
] if ;
|
||||
|
||||
: create-table ( class -- )
|
||||
create-sql-statement [ execute-statement ] with-disposals ;
|
||||
|
|
Loading…
Reference in New Issue