Alzabo::Create::Schema

Alzabo::Create::Schema is a Perl module that contains schema objects for schema creation.
Download

Alzabo::Create::Schema Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dave Rolsky
  • Publisher web site:
  • http://search.cpan.org/~drolsky/

Alzabo::Create::Schema Tags


Alzabo::Create::Schema Description

Alzabo::Create::Schema is a Perl module that contains schema objects for schema creation. Alzabo::Create::Schema is a Perl module that contains schema objects for schema creation.SYNOPSIS use Alzabo::Create::Schema;This class represents the whole schema. It contains table objects, which in turn contain columns, indexes, etc. It contains methods that act globally on the schema, including methods to save it to disk, create itself in an RDBMS, create relationships between tables, etc.InstantiationEvery schema keeps track of whether it has been instantiated or not. A schema that is instantiated is one that exists in an RDBMS backend. This can be done explicitly by calling the schema's create() method. It is also implicitly set when a schema is created as the result of reverse engineering.The most important effect of instantiation is that once a schema is instantiated, the way it generates SQL for itself changes. Before it is instantiated, if you ask it to generate SQL via the make_sql() the method, it will generate the set of SQL statements that are needed to create the schema from scratch.After it is instantiated, the schema will instead generate the SQL necessary to convert the version in the RDBMS backend to match the object's current state. This can be thought of as a SQL 'diff'.While this feature is quite useful, it can be confusing too. The most surprising aspect of this is that if you create a schema via reverse engineering and then call the make_sql() method, you will not get any SQL. This is because the schema knows that it is instantiated and it also knows that it is the same as the version in the RDBMS, so no SQL is necessary.You can use the set_instantiated() method method to change whether or not the schem thinks it is instantiated. Requirements: · Perl


Alzabo::Create::Schema Related Software