Basic support for Complex Columns (Access 2007+)

The major new feature in Access 2007 where so called complex columns.
These can be multivalued fields, attachments, or MEMO fields with
version history. All of them are implemented using hidden helper tables,
and the column itself has type MDB_COMPLEX (0x12) which is basically a
long int used as a key.

This commit adds basic support for this complex type to libmdb.
This commit is contained in:
jakob 2011-03-03 17:20:25 +01:00 committed by Nirgal Vourgère
parent 9967bdf7b1
commit 88ff1c023e
2 changed files with 5 additions and 1 deletions

View File

@ -90,7 +90,8 @@ enum {
MDB_OLE = 0x0b,
MDB_MEMO = 0x0c,
MDB_REPID = 0x0f,
MDB_NUMERIC = 0x10
MDB_NUMERIC = 0x10,
MDB_COMPLEX = 0x12
};
/* SARG operators */

View File

@ -911,6 +911,7 @@ char *mdb_col_to_string(MdbHandle *mdb, void *buf, int start, int datatype, int
(short)mdb_get_int16(buf, start));
break;
case MDB_LONGINT:
case MDB_COMPLEX:
text = g_strdup_printf("%ld",
mdb_get_int32(buf, start));
break;
@ -970,6 +971,7 @@ int mdb_col_disp_size(MdbColumn *col)
return 6;
break;
case MDB_LONGINT:
case MDB_COMPLEX:
return 11;
break;
case MDB_FLOAT:
@ -1006,6 +1008,7 @@ int mdb_col_fixed_size(MdbColumn *col)
return 2;
break;
case MDB_LONGINT:
case MDB_COMPLEX:
return 4;
break;
case MDB_FLOAT: