Database Abstraction Layer for PHP

User Tools

Site Tools



From Version 5.21.0-beta-2

See Also

Structured Schema Management

obj addIndexObject(
    string $indexName,
    optional string $platform=''

The method addIndexObject() is part of the Structured Schema Management suite, and adds an index to the current table object. The index object is a container for Index Item objects, which are the columns themselves.



The name of the index to be created. The name must conform to any pre-defined rules for the database to be used


The platform parameter can be any parameter recognized by the Platform keyword.


In the following example, a table employees is to be created. The table has 2 columns, COL1 and COL2 and an index COL1-IDX will be created, holding COL1.

$t = new metaObjectStructure($dict,'employees');
$i = $t->addIndexObject('COL1-IDX');
v5/dictionary/structure/addindexobject.txt · Last modified: 2016/04/09 19:14 by mnewnham