klyn.databases.sql.DatabaseMetaData.indexes
method

    public indexes(catalog as String = "",
    schema as String = "",
    tableName as String = "",
    unique as Boolean = false) as ResultSet throws SQLException

Description

Returns index metadata for one table.

Rows expose the portable labels `TABLE_CAT`, `TABLE_SCHEM`, `TABLE_NAME`, `NON_UNIQUE`, `INDEX_NAME`, `ORDINAL_POSITION`, and `COLUMN_NAME`.

Parameters

Parameter | Description
--- | ---
`catalog` | Exact catalog, or the current catalog when empty.
`schema` | Exact schema, or the current schema when empty.
`tableName` | Exact table name.
`unique` | Whether only unique indexes should be returned.

Returns

Index metadata result set.

Throws

- SQLException if metadata cannot be read.

Example

    indexes = metadata.indexes(tableName="users", unique=true)