ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:dictionary:dictionary_index

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v5:dictionary:dictionary_index [2016/05/13 17:04] – [Table] mnewnhamv5:dictionary:dictionary_index [2024/12/18 10:19] (current) – [Introduction] dregad
Line 4: Line 4:
 ====== The Data Dictionary ====== ====== The Data Dictionary ======
 ===== Introduction ===== ===== 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. +The Data Dictionary provides a series of **'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 ===== ===== 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 [[v5:dictionary:metatype|metaType()]] method. 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 [[v5:dictionary:metatype|metaType()]] method.
-==== Summary Of Types ====+==== Summary Of Standard Types ====
 ^ Type  ^ Represents Field Types                                                                                                                                                                    ^ When Using addColumnSql               ^ Example  ^ ^ Type  ^ Represents Field Types                                                                                                                                                                    ^ When Using addColumnSql               ^ Example  ^
 | C     | character fields that should be shown in a <input type="text"> tag                                                                                                                        | Add the length of the field           | C(20)    | | C     | character fields that should be shown in a <input type="text"> tag                                                                                                                        | Add the length of the field           | C(20)    |
Line 14: Line 14:
 | X     | TeXt, large text or CLOB fields that should be shown in a <textarea>                                                                                                                      |                                                | | X     | TeXt, large text or CLOB fields that should be shown in a <textarea>                                                                                                                      |                                                |
 | X2    | Like an X field, but where possible creates a field that can hold multi-byte (unicode) data is created                                                                                    |                                                | | X2    | Like an X field, but where possible creates a field that can hold multi-byte (unicode) data is created                                                                                    |                                                |
-| XL    | On systems that support it, creates a large clob field (32K). This may require additional database configuration. If the database does not support it, a standard clob field is created.  |                                                |+| XL    | On systems that support it, creates a large clob field (>32K). This may require additional database configuration. If the database does not support it, a standard clob field is created.  |                                                |
 | B     | Blobs, or Binary Large Objects. Typically images.                                                                                                                                                                                        | | B     | Blobs, or Binary Large Objects. Typically images.                                                                                                                                                                                        |
 | D     | Date (sometimes DateTime) field                                                                                                                                                                                                          | | D     | Date (sometimes DateTime) field                                                                                                                                                                                                          |
Line 35: Line 35:
  
 | [[v5:dictionary:actualtype|actualType()]]            | Returns a string description of the actual data type linked to the [[v5:dictionary:metatype|metaType]] for the currently connected database  | | [[v5:dictionary:actualtype|actualType()]]            | Returns a string description of the actual data type linked to the [[v5:dictionary:metatype|metaType]] for the currently connected database  |
 +| [[v5:reference:connection:setcustomactualtype|setCustomActualType()]]     | Links a physical database type to a custom metatype |
 +| [[v5:dictionary:getcustomactualtypes|getCustomActualTypes()]]    | Returns a list of previously defined custom  |
 | [[v5:dictionary:metacolumns|metaColumns()]]          | Returns a list of available columns and column type information for the supplied table name                                               | | [[v5:dictionary:metacolumns|metaColumns()]]          | Returns a list of available columns and column type information for the supplied table name                                               |
 | [[v5:dictionary:metacolumnnames|metaColumnNames()]]  | Returns a list of available columns for the supplied table name                                                                           | | [[v5:dictionary:metacolumnnames|metaColumnNames()]]  | Returns a list of available columns for the supplied table name                                                                           |
Line 45: Line 47:
 | [[v5:dictionary:metatransaction|metaTransaction()]]  | Returns a database specific transaction mode for a provided meta transaction type                                                         | | [[v5:dictionary:metatransaction|metaTransaction()]]  | Returns a database specific transaction mode for a provided meta transaction type                                                         |
 | [[v5:dictionary:metatype|metaType()]]                | Converts database-specific data type into a portable type                                                                                 | | [[v5:dictionary:metatype|metaType()]]                | Converts database-specific data type into a portable type                                                                                 |
-| [[v5:dictionary:serverinfo|serverInfo()]]            | Returns a set of server information                                                                                                       |+| [[v5:dictionary:setcustommetatype|setCustomMetaType()]] | Creates a custom, database-specific data type and defines how it is handled by inserts and updates                                                                            | 
 +| [[v5:dictionary:getcustommetatypes|getCustomMetaTypes()]] | Returns a list of custom metatypes                                                                             | 
 +| [[v5:reference:connection:serverinfo|serverInfo()]]            | Returns a set of server information                                                                                                       |
 ===== Schema Management ===== ===== Schema Management =====
 <WRAP info> <WRAP info>
-The userid used when establishing a database connection may need specific privileges beyond normal INSERT,DELETE,UPDATE,SELECT in order to manage a schema in a database. Those privileges vary from one DBMS to another.+The user id used when establishing a database connection may need specific privileges beyond normal INSERT, DELETE, UPDATE, SELECT in order to manage a schema in a database. Those privileges vary from one DBMS to another.
 </WRAP> </WRAP>
 ==== Executing prepared code to update the schema ==== ==== Executing prepared code to update the schema ====
-Each of the methods below return an array of data, which should be executed using the [[v5:dictionary:executesqlarray|executeSqlArray()]] method + 
 +Each of the methods below returns an array of data, which should be executed using the [[v5:dictionary:executesqlarray|executeSqlArray()]] method
  
 ==== Creating A Database ==== ==== Creating A Database ====
v5/dictionary/dictionary_index.1463151889.txt.gz · Last modified: 2017/04/21 11:28 (external edit)