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
ParameterDescription
catalogExact catalog, or the current catalog when empty.
schemaExact schema, or the current schema when empty.
tableNameExact table name.
uniqueWhether 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)