[GB.DB.MYSQL]

* NEW: Support for MyySQL 5 BIT(x) field datatype.


git-svn-id: svn://localhost/gambas/trunk@3964 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2011-08-02 21:26:43 +00:00
parent dfd894971e
commit 750758a5b4

View file

@ -157,6 +157,14 @@ static GB_TYPE conv_type(int type, int len)
return DB_T_BLOB;
else
return GB_T_STRING;
case FIELD_TYPE_BIT:
if (len == 1)
return GB_T_BOOLEAN;
else if (len <= 32)
return GB_T_INTEGER;
else if (len <= 64)
return GB_T_LONG;
case FIELD_TYPE_TINY_BLOB:
case FIELD_TYPE_MEDIUM_BLOB:
@ -205,6 +213,7 @@ static int conv_string_type(const char *type, long *len)
{ "longtext", FIELD_TYPE_LONG_BLOB },
{ "set", FIELD_TYPE_SET },
{ "enum", FIELD_TYPE_ENUM },
{ "bit", FIELD_TYPE_BIT },
{ "null", FIELD_TYPE_NULL },
{ NULL, 0 },
};