Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

alzabo::index(3pm) [debian 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)

Check Out this Related Man Page

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

NAME
Alzabo::MySQL - Alzabo and MySQL DESCRIPTION
This documentation is about what special support Alzabo has for MySQL, as well as what is lacking. MySQL support is based on the 3.23.* release series, with some support for features that are starting to appear in the 4.0.* releases. Earlier versions of MySQL will probably work with Alzabo, though Alzabo cannot magically make these releases support new features like fulltext indexes. Indexes o Alzabo supports the ability to specify prefixes when adding an index. Prefixes are required when attempting to index any sort of text or blob column. o Alzabo supports the creation of fulltext indexes and their use in SELECT and WHERE clauses. This includes the ability to get back the score given for a match as part of a select, using the "function" or "select" methods of either table or schema objects. Reverse Engineering o When reverse engineering a schema, Alzabo knows that MySQL has "default defaults" for certain column types. For example, if a DATE column is specified as NOT NULL but is not assigned a default, MySQL gives this column a default of '0000-00-00'. Because Alzabo knows about this, it will ignore these defaults when reverse engineering an RDBMS. o Similarly, Alzabo knows that MySQL assigns default "lengths" to many column types. For example, if given INTEGER as a column type, MySQL will convert this to INTEGER(11) or INTEGER(10), depending on the version of MySQL being used. Again, Alzabo ignores these lengths when reverse engineering a schema. o All of this may lead to apparent inconsistencies when using the with the "Alzabo::Create::Schema->sync_backend" or "Alzabo::Cre- ate::Schema->sync_backend_sql" methods. If you are using this feature from the web based schema creator, you will see that even imme- diately after running the "sync_backend()" method, Alzabo may still think there are differences between the two schemas. This is not a problem, as running the SQL Alzabo generates will not actually change your database. Transactions Alzabo will try to use transactions whenever appropriate. Unfortunately, there is no way to determine whether or not a given table supports transactions so Alzabo simply calls DBI's "begin_work()" method, whether or not this will actually do anything. Constraints and Foreign Keys o Column constraints are treated as column attributes. o Foreign key constraints are not generated when generating SQL for a MySQL schema. This will probably change in the future. Table Types These can be specified as a table attribute. perl v5.8.8 2007-12-23 Alzabo::MySQL(3pm)
Man Page