Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dbix::dbschema::index(3pm) [debian man page]

DBSchema::Index(3pm)					User Contributed Perl Documentation				      DBSchema::Index(3pm)

NAME
DBIx::DBSchema::Index - Index objects SYNOPSYS
use DBIx::DBSchema::Index; $index = new DBIx::DBSchema::Index ( { } ); DESCRIPTION
DBIx::DBSchema::Index objects represent a unique or non-unique database index. METHODS
new HASHREF | OPTION, VALUE, ... Creates a new DBIx::DBschema::Index object. Accepts either a hashref or a list of options and values. Options are: name - Index name using - Optional index method unique - Boolean indicating whether or not this is a unique index. columns - List reference of column names (or expressions) name [ INDEX_NAME ] Returns or sets the index name. using [ INDEX_METHOD ] Returns or sets the optional index method. unique [ BOOL ] Returns or sets the unique flag. columns [ LISTREF ] Returns or sets the indexed columns (or expressions). columns_sql Returns a comma-joined list of columns, suitable for an SQL statement. sql_create_index TABLENAME Returns an SQL statment to create this index on the specified table. cmp OTHER_INDEX_OBJECT Compares this object to another supplied object. Returns true if they are identical, or false otherwise. cmp_noname OTHER_INDEX_OBJECT Compares this object to another supplied object. Returns true if they are identical, disregarding index name, or false otherwise. AUTHOR
Ivan Kohler <ivan-dbix-dbschema@420.am> Copyright (c) 2007 Ivan Kohler Copyright (c) 2007 Freeside Internet Services, Inc. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. BUGS
Is there any situation in which sql_create_index needs to return a list of multiple statements? SEE ALSO
DBIx::DBSchema::Table, DBIx::DBSchema, DBI perl v5.14.2 2007-06-28 DBSchema::Index(3pm)

Check Out this Related Man Page

Alzabo::Index(3pm)					User Contributed Perl Documentation					Alzabo::Index(3pm)

NAME
Alzabo::Index - Index objects SYNOPSIS
foreach my $i ($table->indexes) { foreach my $c ($i->columns) { print $c->name; print '(' . $i->prefix($c) . ')' if $i->prefix($c); } } DESCRIPTION
This object represents an index on a table. Indexes consist of columns and optional prefixes for each column. The prefix specifies how many characters of the columns should be indexes (the first X chars). Some RDBMS's do not have a concept of index prefixes. Not all col- umn types are likely to allow prefixes though this depends on the RDBMS. The order of the columns is significant. METHODS
columns Returns an ordered list of the "Alzabo::Column" objects that are being indexed. prefix ("Alzabo::Column" object) A column prefix is, to the best of my knowledge, a MySQL specific concept, and as such cannot be set when using an RDBMSRules module for a different RDBMS. However, it is important enough for MySQL to have the functionality be present. It allows you to specify that the index should only look at a certain portion of a field (the first N characters). This prefix is required to index any sort of BLOB column in MySQL. This method returns the prefix for the column in the index. If there is no prefix for this column in the index, then it returns undef. unique Returns a boolean value indicating whether the index is a unique index. fulltext Returns a boolean value indicating whether the index is a fulltext index. function For function indexes, this returns the function being indexed. id The id is generated from the table, column and prefix information for the index. This is useful as a canonical name for a hash key, for example. Returns a string that is the id which uniquely identifies the index in this schema. table Returns the "Alzabo::Table" object to which the index belongs. AUTHOR
Dave Rolsky, <autarch@urth.org> perl v5.8.8 2007-12-23 Alzabo::Index(3pm)
Man Page