|
 |
The Index object represents an index in a data table.
Constructor
tableObject.indexes.add(indexname, fields_array [,constraint]) |
Creates a new index indexname in the data table represented by tableObject. This method also constructs and returns a new Index object instance. See the add() method of the Indexes collection for more detailed information. |
tableObject.indexes.fetch(indexname) |
This method constructs an Index object instance representing the index indexname. Unlike the add() method above, this method does not create a new index in the data table, it only creates the Index object instance. See the fetch() method of the Indexes collection for more information. | | Instance Properties
name |
A read only string property that records the name of the Index object. |
constraint |
A Boolean value indicating whether the index enforces uniqueness. |
fields |
A string consisting of a comma-separated list of the fields that make up the index. For example, 'fieldA, fieldB, fieldC'. | |
Instance Method
getFieldNames |
Returns an Array object containing the names of the fields in the index. | |
Example
var tbl = Web.tables.fetch("AddressBook");
var fld = Array("userName");
tbl.indexes.add("index", fld, true);
|