db.tuples: use fry instead of curry, fix stack effect of check-columns.
parent
cf137d9976
commit
8b71fe04f3
|
@ -40,13 +40,11 @@ GENERIC: eval-generator ( singleton -- object )
|
||||||
|
|
||||||
: query-modify-tuple ( tuple statement -- )
|
: query-modify-tuple ( tuple statement -- )
|
||||||
[ query-results [ sql-row-typed ] with-disposal ] keep
|
[ query-results [ sql-row-typed ] with-disposal ] keep
|
||||||
out-params>> rot [
|
out-params>> rot '[ slot-name>> _ set-slot-named ] 2each ;
|
||||||
[ slot-name>> ] dip set-slot-named
|
|
||||||
] curry 2each ;
|
|
||||||
|
|
||||||
: with-disposals ( object quotation -- )
|
: with-disposals ( object quotation -- )
|
||||||
over sequence? [
|
over sequence? [
|
||||||
over [ dispose-each ] curry [ ] cleanup
|
over '[ _ dispose-each ] [ ] cleanup
|
||||||
] [
|
] [
|
||||||
with-disposal
|
with-disposal
|
||||||
] if ; inline
|
] if ; inline
|
||||||
|
@ -73,7 +71,8 @@ PRIVATE>
|
||||||
|
|
||||||
! High level
|
! High level
|
||||||
ERROR: no-slots-named class seq ;
|
ERROR: no-slots-named class seq ;
|
||||||
: check-columns ( class columns -- )
|
|
||||||
|
: check-columns ( columns class -- )
|
||||||
[ nip ] [
|
[ nip ] [
|
||||||
[ keys ]
|
[ keys ]
|
||||||
[ all-slots [ name>> ] map ] bi* diff
|
[ all-slots [ name>> ] map ] bi* diff
|
||||||
|
|
Loading…
Reference in New Issue