tuple-db: find-tuples fixed for querying all instances
parent
7f77901801
commit
94d2384ec4
|
@ -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 ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue