tuple-db: find-tuples fixed for querying all instances

cvs
Chris Double 2005-10-13 01:14:36 +00:00
parent 7f77901801
commit 94d2384ec4
1 changed files with 6 additions and 2 deletions

View File

@ -163,7 +163,6 @@ M: mapping select-sql ( tuple mapping -- select )
#! will select based on only the filled in fields of the tuple (ie. all non-f). #! will select based on only the filled in fields of the tuple (ie. all non-f).
[ [
"select ROWID,* from " % dup mapping-table % "select ROWID,* from " % dup mapping-table %
" where " %
mapping-fields [ ( tuple field ) mapping-fields [ ( tuple field )
swap over db-field-slot slot ( field value ) swap over db-field-slot slot ( field value )
[ [
@ -171,7 +170,12 @@ M: mapping select-sql ( tuple mapping -- select )
] [ ] [
drop f drop f
] if ] if
] map-with [ ] subset " and " join % ] map-with [ ] subset dup length 0 > [
" where " %
" and " join %
] [
drop
] if
";" % ";" %
] "" make ; ] "" make ;