[gnome-db] get_mysql_types - doesnt appear to match manual.
- From: Alan Knowles <alan akbkhome com>
- To: GDA <gnome-db-list gnome org>
- Subject: [gnome-db] get_mysql_types - doesnt appear to match manual.
- Date: Tue, 31 Aug 2004 01:01:24 +0800
I'm using GDA_CONNECTION_SCHEMA_TYPES to work out the GdaValue type
from a schema to build requests, however I just discovered that type
'int' is not listed (hence my lookup fails), causing the usual implosion :)
Comparing the code in get_mysql_types to the mysql manual, there are
quite a few differences, is this intentional?, was SCHEMA_TYPES designed
for this use? did you want a patch to fix it?
Comparison:
Currently the code looks like:
{ "blob", "", "Binary blob", GDA_VALUE_TYPE_BINARY },
{ "date", "", "Date", GDA_VALUE_TYPE_DATE },
{ "datetime", "", "Date and time", GDA_VALUE_TYPE_TIMESTAMP },
{ "decimal", "", "Decimal number", GDA_VALUE_TYPE_DOUBLE },
{ "double", "", "Double precision number", GDA_VALUE_TYPE_DOUBLE },
{ "enum", "", "Enumeration", GDA_VALUE_TYPE_STRING },
{ "float", "", "Single precision number", GDA_VALUE_TYPE_SINGLE },
{ "int24", "", "24 bit integer", GDA_VALUE_TYPE_BIGINT },
{ "long", "", "Long integer", GDA_VALUE_TYPE_INTEGER },
{ "longlong", "", "Extra long integer", GDA_VALUE_TYPE_BIGINT },
{ "set", "", "Set", GDA_VALUE_TYPE_STRING },
{ "short", "", "Short integer", GDA_VALUE_TYPE_SMALLINT },
{ "string", "", "String", GDA_VALUE_TYPE_STRING },
{ "time", "", "Time", GDA_VALUE_TYPE_TIME },
{ "timestamp", "", "Time stamp", GDA_VALUE_TYPE_TIMESTAMP },
{ "tiny", "", "Tiny integer", GDA_VALUE_TYPE_SMALLINT },
{ "year", "", "Year", GDA_VALUE_TYPE_INTEGER }
I could not find any reference to these types in the mysql manual
int24? = no reference..
longlong? = no reference
short? = no reference
string? = no reference
tiny? = no reference
These are listed on the mysql manual, but do not have a mapping.
TINYINT
BIT
BOOL
BOOLEAN
SMALLINT
MEDIUMINT
INT
INTEGER
BIGINT
REAL
DEC
NUMERIC
FIXED
CHAR
VARCHAR
TINYBLOB
TINYTEXT
TEXT
MEDIUMBLOB
MEDIUMTEXT
LONGBLOB
LONGTEXT
Regards
Alan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]