V6
[[v6:dictionary:Index]]\\
====== The Data Dictionary ======
===== Introduction =====
The Data Dictionary provides a series of functions **'Meta-Functions'** that allow a portable method of managing the schema of databases, from simple querying of data attributes of columns to XML based routines to build and manage new tables.
===== Portable Data Types =====
ADOdb provides a cross-platform method of identifying the data type of a field. These values can be used as a replacement in code that relies on the data type of field to produce a result. Each database driver contains a cross-reference table of datatypes that can accessed using the [[v6:dictionary:metatype|metaType()]] method.
==== Summary Of Types ====
Each MetaType now has 2 representative class constants available:
- A Short Constant, which is formed from **ADODB_METATYPE_** plus the type defined below, e.g ADODB_METATYPE_J
- A Long Constant, which is formed from **ADODB_METATYPE_** plus the value shown, e.g. ADODB_METATYPE_JSON
The constants are available from both the main connection class and the ADOMetaFunction class, e.g. ADOConnection::ADODB_METATYPE_INT
^ Type ^ Long Constant ^ Represents Field Types ^ When Using addColumnSql ^ Example ^
| C |CHAR | character fields that should be shown in a tag | Add the length of the field | C(20) |
| C2 |MCHAR | Like a C field, but where possible a field that can hold multi-byte (unicode) data is created | Add the length of the field | C2(20) |
| X |TEXT | TeXt, large text or CLOB fields that should be shown in a