Handbook
Glossary
advance-row ( result-set -- )
Furnace framework
»
Database library
»
Low-level database protocol
»
Result sets
Prev:
#columns ( result-set -- n )
Next:
more-rows? ( result-set -- ? )
Vocabulary
db
Inputs
result-set
a
result-set
Outputs
None
Word description
Advanced the pointer to an underlying SQL result set stored in a
result-set
object.
Definition
IN:
db
GENERIC:
advance-row
( result-set -- )
Methods
USING:
accessors
db
db.mysql
db.mysql.ffi
kernel
math
namespaces
specialized-arrays.instances.alien.c-types.ulong
specialized-arrays.instances.alien.c-types.void*
;
M:
mysql-result-set
advance-row
dup
handle>>
dup
mysql_fetch_row
[
swap
mysql_fetch_lengths
pick
#columns>>
[
<direct-void*-array>
>>pointers
]
[
<direct-ulong-array>
>>lengths
]
bi-curry
bi*
t
>>has-more?
]
[
db-connection
get
handle>>
dup
mysql_errno
zero?
[
2drop
f
>>has-more?
f
>>pointers
f
>>lengths
]
[
mysql_error
throw
]
if
]
if*
drop
;
USING:
accessors
db
db.postgresql
kernel
math
;
M:
postgresql-result-set
advance-row
[
1
+
]
change-n
drop
;
USING:
accessors
db
db.sqlite
db.sqlite.lib
kernel
;
M:
sqlite-result-set
advance-row
dup
handle>>
sqlite-next
>>has-more?
drop
;