Handbook
Glossary
sqlite-column-typed ( handle index type -- obj )
Vocabulary
db
.
sqlite
.
lib
Inputs
handle
an
object
index
an
object
type
an
object
Outputs
obj
an
object
Definition
USING:
arrays
calendar.parser
combinators
db.sqlite.ffi
db.types
kernel
sequences
serialize
urls
;
IN:
db.sqlite.lib
:
sqlite-column-typed
( handle index type -- obj )
dup
array?
[
first
]
when
{
{
+db-assigned-id+
[
sqlite3_column_int64
]
}
{
+random-id+
[
sqlite3-column-uint64
]
}
{
INTEGER
[
sqlite3-column-int
]
}
{
BIG-INTEGER
[
sqlite3-column-int64
]
}
{
SIGNED-BIG-INTEGER
[
sqlite3-column-int64
]
}
{
UNSIGNED-BIG-INTEGER
[
sqlite3-column-uint64
]
}
{
BOOLEAN
[
sqlite3-column-int
1
=
]
}
{
DOUBLE
[
sqlite3-column-double
]
}
{
TEXT
[
sqlite3_column_text
]
}
{
VARCHAR
[
sqlite3_column_text
]
}
{
DATE
[
sqlite3_column_text
dup
[
ymd>timestamp
]
when
]
}
{
TIME
[
sqlite3_column_text
dup
[
hms>duration
]
when
]
}
{
TIMESTAMP
[
sqlite3_column_text
dup
[
ymdhms>timestamp
]
when
]
}
{
DATETIME
[
sqlite3_column_text
dup
[
ymdhms>timestamp
]
when
]
}
{
BLOB
[
sqlite-column-blob
]
}
{
URL
[
sqlite3_column_text
dup
[
>url
]
when
]
}
{
FACTOR-BLOB
[
sqlite-column-blob
dup
[
bytes>object
]
when
]
}
[
no-sql-type
]
}
case
;