Handbook
Glossary
query-results ( query -- result-set )
Furnace framework
»
Database library
»
Low-level database protocol
Prev:
low-level-bind ( statement -- )
Next:
Result sets
Vocabulary
db
Inputs
query
an
object
Outputs
result-set
a
result-set
Word description
Returns a
result-set
object representing the results of an SQL query. See
Result sets
.
Definition
IN:
db
GENERIC:
query-results
( query -- result-set )
Methods
USING:
accessors
db
db.mysql
db.mysql.ffi
kernel
math
namespaces
;
M:
mysql-statement
query-results
db-connection
get
handle>>
dup
pick
sql>>
mysql_query
zero?
[
mysql_error
throw
]
unless
dup
mysql_use_result
dup
[
nip
dup
mysql_num_fields
[
mysql-result-set
new-result-set
]
dip
>>#columns
dup
advance-row
]
[
swap
dup
mysql_field_count
zero?
[
drop
]
[
mysql_error
throw
]
if
mysql-result-set
new-result-set
]
if
;
USING:
accessors
db
db.postgresql
db.postgresql.lib
kernel
;
M:
postgresql-statement
query-results
dup
bind-params>>
[
over
[
bind-statement
]
keep
do-postgresql-bound-statement
]
[
dup
do-postgresql-statement
]
if*
postgresql-result-set
new-result-set
dup
init-result-set
;
USING:
accessors
db
db.sqlite
kernel
;
M:
sqlite-statement
query-results
sqlite-maybe-prepare
dup
handle>>
sqlite-result-set
new-result-set
dup
advance-row
;