Handbook
Glossary
pq-get-blob ( handle row column -- obj/f )
Vocabulary
db
.
postgresql
.
lib
Inputs
handle
an
object
row
an
object
column
an
object
Outputs
obj/f
an
object
Definition
USING:
alien.c-types
alien.data
db.postgresql.ffi
destructors
kernel
math
strings
;
IN:
db.postgresql.lib
:
pq-get-blob
( handle row column -- obj/f )
[
PQgetvalue
]
3keep
3dup
PQgetlength
dup
0
>
[
3nip
[
memory>byte-array
>string
{
uint
}
[
PQunescapeBytea
dup
zero?
[
postgresql-result-error-message
throw
]
[
&PQfreemem
]
if
]
with-out-parameters
memory>byte-array
]
with-destructors
]
[
drop
pq-get-is-null
nip
f
B{
}
?
]
if
;