Handbook
Glossary
postgresql-column-typed ( handle row column type -- obj )
Vocabulary
db
.
postgresql
.
lib
Inputs
handle
an
object
row
an
object
column
an
object
type
an
object
Outputs
obj
an
object
Definition
USING:
arrays
calendar.parser
combinators
db.types
kernel
sequences
serialize
urls
;
IN:
db.postgresql.lib
:
postgresql-column-typed
( handle row column type -- obj )
dup
array?
[
first
]
when
{
{
+db-assigned-id+
[
pq-get-number
]
}
{
+random-id+
[
pq-get-number
]
}
{
INTEGER
[
pq-get-number
]
}
{
BIG-INTEGER
[
pq-get-number
]
}
{
DOUBLE
[
pq-get-number
]
}
{
TEXT
[
pq-get-string
]
}
{
VARCHAR
[
pq-get-string
]
}
{
DATE
[
pq-get-string
dup
[
ymd>timestamp
]
when
]
}
{
TIME
[
pq-get-string
dup
[
hms>duration
]
when
]
}
{
TIMESTAMP
[
pq-get-string
dup
[
ymdhms>timestamp
]
when
]
}
{
DATETIME
[
pq-get-string
dup
[
ymdhms>timestamp
]
when
]
}
{
BLOB
[
pq-get-blob
]
}
{
URL
[
pq-get-string
dup
[
>url
]
when
]
}
{
FACTOR-BLOB
[
pq-get-blob
dup
[
bytes>object
]
when
]
}
[
no-sql-type
]
}
case
;