db.tuples: use fry instead of curry, fix stack effect of check-columns.

windows-high-dpi
John Benediktsson 2018-02-14 09:49:27 -08:00
parent cf137d9976
commit 8b71fe04f3
1 changed files with 4 additions and 5 deletions

View File

@ -40,13 +40,11 @@ GENERIC: eval-generator ( singleton -- object )
: query-modify-tuple ( tuple statement -- )
[ query-results [ sql-row-typed ] with-disposal ] keep
out-params>> rot [
[ slot-name>> ] dip set-slot-named
] curry 2each ;
out-params>> rot '[ slot-name>> _ set-slot-named ] 2each ;
: with-disposals ( object quotation -- )
over sequence? [
over [ dispose-each ] curry [ ] cleanup
over '[ _ dispose-each ] [ ] cleanup
] [
with-disposal
] if ; inline
@ -73,7 +71,8 @@ PRIVATE>
! High level
ERROR: no-slots-named class seq ;
: check-columns ( class columns -- )
: check-columns ( columns class -- )
[ nip ] [
[ keys ]
[ all-slots [ name>> ] map ] bi* diff