PHP Class dbIndex, pkp-lib

This class stores information about a database index. As charactaristics of the index are loaded from the external source, methods and properties of this class are used to build up the index description in ADOdb's datadict format.
Afficher le fichier Open project: pkp/pkp-lib

Méthodes publiques

Свойство Type Description
$columns Indexed fields: Table columns included in this index
$drop Mark index for destruction
$name Index name
$opts Index options: Index-level options

Méthodes publiques

Méthode Description
_tag_cdata ( &$parser, $cdata ) XML Callback to process CDATA elements
_tag_close ( &$parser, $tag ) XML Callback to process end elements
_tag_open ( &$parser, $tag, $attributes ) XML Callback to process start elements
addField ( string $name ) : string Adds a field to the index
addIndexOpt ( string $opt ) : string Adds options to the index
create ( object &$xmls ) : array Generates the SQL that will create the index in the database
dbIndex ( object &$parent, array $attributes = NULL ) Initializes the new dbIndex object.
drop ( ) Marks an index for destruction

Method Details

_tag_cdata() public méthode

Processes XML cdata.
public _tag_cdata ( &$parser, $cdata )

_tag_close() public méthode

XML Callback to process end elements
public _tag_close ( &$parser, $tag )

_tag_open() public méthode

Processes XML opening tags. Elements currently processed are: DROP, CLUSTERED, BITMAP, UNIQUE, FULLTEXT & HASH.
public _tag_open ( &$parser, $tag, $attributes )

addField() public méthode

Adds a field to the index
public addField ( string $name ) : string
$name string Field name
Résultat string Field list

addIndexOpt() public méthode

Adds options to the index
public addIndexOpt ( string $opt ) : string
$opt string Comma-separated list of index options.
Résultat string Option list

create() public méthode

Generates the SQL that will create the index in the database
public create ( object &$xmls ) : array
$xmls object adoSchema object
Résultat array Array containing index creation SQL

dbIndex() public méthode

Initializes the new dbIndex object.
public dbIndex ( object &$parent, array $attributes = NULL )
$parent object Parent object
$attributes array Attributes

drop() public méthode

Marks an index for destruction
public drop ( )

Property Details

$columns public_oe property

Indexed fields: Table columns included in this index
public $columns

$drop public_oe property

Mark index for destruction
public $drop

$name public_oe property

Index name
public $name

$opts public_oe property

Index options: Index-level options
public $opts