Handbook
Glossary
dereference-type-pointer ( byte-array column -- object )
Vocabulary
odbc
Inputs
byte-array
an
object
column
an
object
Outputs
object
an
object
Definition
USING:
accessors
alien.c-types
alien.data
alien.strings
calendar
combinators
io.encodings.ascii
io.encodings.utf8
kernel
math
pack
sequences
sequences.generalizations
;
IN:
odbc
:
dereference-type-pointer
( byte-array column -- object )
type>>
{
{
SQL_CHAR
[
utf8
alien>string
]
}
{
SQL_VARCHAR
[
utf8
alien>string
]
}
{
SQL_LONGVARCHAR
[
utf8
alien>string
]
}
{
SQL_WCHAR
[
utf8
alien>string
]
}
{
SQL_WCHARVAR
[
utf8
alien>string
]
}
{
SQL_WLONGCHARVAR
[
utf8
alien>string
]
}
{
SQL_DECIMAL
[
ascii
alien>string
]
}
{
SQL_TYPE_TIMESTAMP
[
"SSSSSSI"
unpack-le
7
firstn
1000000000
/
+
instant
<timestamp>
]
}
{
SQL_SMALLINT
[
short
deref
]
}
{
SQL_INTEGER
[
long
deref
]
}
{
SQL_REAL
[
float
deref
]
}
{
SQL_FLOAT
[
double
deref
]
}
{
SQL_DOUBLE
[
double
deref
]
}
{
SQL_TINYINT
[
char
deref
]
}
{
SQL_BIGINT
[
longlong
deref
]
}
[
nip
name>>
"Unknown SQL Type: "
prepend
]
}
case
;