Index

Class which represent a database index. Provides attributes and methods for details of the index.

Kind: global class

new Index(args)

Constructor function. You don't need to call constructor manually. pg-structure handles this.

Param Type Description
args Object Attributes of the Index instance to be created.
args.name string Name of the Index.
args.isUnique string Is it a unique index.
args.isPrimaryKey string Is it a primary key index.
args.parent Table Parent Table of the Index.

index.name : string

Name of the index.

Kind: instance property of Index
Read only: true

index.fullName : string

Full name of the index with (.) notation.

Kind: instance property of Index
Read only: true
Example

var fullName = index.fullName; // crm.public

index.fullCatalogName : string

Full name of the index with (.) notation including catalog name.

Kind: instance property of Index
Read only: true
Example

var fullCatalogName = index.fullCatalogName; // crm.public

index.isUnique : boolean

If true, this is a unique index.

Kind: instance property of Index
Read only: true

index.isPrimaryKey : boolean

If true, this index represents the primary key of the table (isUnique is always true for primary keys.)

Kind: instance property of Index
Read only: true

index.table : Table

Table which this index belongs to.

Kind: instance property of Index
Read only: true

index.parent : Table

Table which this index belongs to.

Kind: instance property of Index
Read only: true

index.db : Db

Db this index belongs to.

Kind: instance property of Index
Read only: true

index.schema : Schema

Schema this index belongs to.

Kind: instance property of Index
Read only: true

index.columns : Array.<Column>

List of columns restricted by index, in order their ordinal position within the index key. If index does not have any columns this is null.

Kind: instance property of Index
Read only: true

index.columnsByName : Object.<string, Column>

List of columns restricted by index, in order their ordinal position within the index key. If index does not have any columns this is null.

Kind: instance property of Index
Read only: true