Handbook
Glossary
<select-by-slots-statement> ( tuple class -- statement )
High-level tuple/database integration
ยป
Tuple database protocol
Prev:
<delete-tuples-statement> ( tuple class -- object )
Next:
<count-statement> ( query -- statement )
Vocabulary
db
.
tuples
Inputs
tuple
a
tuple
class
a
class
Outputs
statement
a
tuple
Word description
A database-specific hook for generating the SQL for a select statement.
Definition
USING:
db
;
IN:
db.tuples
HOOK:
<select-by-slots-statement>
db-connection
( tuple class -- statement )
Methods
USING:
accessors
db
db.queries
db.tuples
db.types
kernel
nmake
sequences
;
M:
db-connection
<select-by-slots-statement>
[
"select "
0%
[
dupd
filter-ignores
]
dip
over
empty?
[
all-slots-ignored
]
when
over
[
", "
0%
]
[
dup
column-name>>
0%
2,
]
interleave
" from "
0%
0%
where-clause
]
query-make
;