[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:
parent
dfd894971e
commit
750758a5b4
1 changed files with 9 additions and 0 deletions
|
@ -158,6 +158,14 @@ static GB_TYPE conv_type(int type, int len)
|
|||
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:
|
||||
case FIELD_TYPE_STRING:
|
||||
|
@ -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 },
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue