Alzabo

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

  parameters.  Reported by Barry Hoggard.

- Newer versions of MySQL may return quoted table names, which broke
  reverse engineering.

- Added a quick and nasty hack to remove the schema name from table
  names when reverse engineering Postgres schemas.

- Reverse engineering of indexes for MySQL 4.0+ was broken.

---------------------------------------------------------------------------

0.72  April 12, 2003

ENHANCEMENTS:

- Rewrote the complex build/install system to use Module::Build, which
  simplified quite a bit of code.  Additionally, this should eliminate
  problems reported by Win32 users with the generated Makefile,
  because there is no longer a Makefile ;)

BUG FIXES:

- Fixed the Alzabo::MethodMaker->docs_as_pod method, which simply died
  when used with a recent version of Params::Validate.  Reported by
  Ken Williams.

---------------------------------------------------------------------------

0.71  April 6, 2003

ENHANCEMENTS:

- Alzabo now tracks table and column renames after a schema has been
  instantiated.  This means that when updating the schema in the
  database after such a change, Alzabo can ensure that there is no
  data lost because of the change.  Previously, Alzabo treated name
  changes as a drop followed by an add, which caused data loss.

- Alzabo::DriverStatement->next_hash has been renamed next_as_hash, in
  order to be consistent with the Alzabo::Runtime::Cursor classes.

- Experimental support for restriction clauses as part of an outer
  join, such as

    SELECT ...
      FROM Foo
           LEFT OUTER JOIN Bar
              ON Foo.foo_id = Bar.foo_id
                 AND Bar.something > 2

- Added support for HAVING in queries.

BUG FIXES:

- Exceptions did not include a stack trace.

- Trying to create a Postgres schema with foreign keys defined caused
  an exception.  Reported by Josh Jore.

- Fetching rows from the cursor for a join with multiple outer joins
  could fail if data was being prefetched.

DEPRECATIONS:

- Alzabo::DriverStatement->next_hash method has been renamed
  next_as_hash.

---------------------------------------------------------------------------

0.70  November 21, 2002

ENHANCEMENTS:

- The exception thrown when you attempt to set a non-nullable column
  to NULL is now an Alzabo::Exception::NotNullable exception, instead
  of an Alzabo::Exception::Params exception.  In the interests of
  backwards compatibility, the former is a subclass of the latter.

- Improved debugging options.  See the new Alzabo::Debug module for
  details.

BUG FIXES:

- Fixed Alzabo::Table->primary_key, which would die when no primary
  key existed and it was called in a scalar context.  In an array
  context, all the columns in the table were returned.  Reported by
  Eric Prestemon.

- Alzabo::ObjectCache::Sync::RDBMS created a table that it would later
  consider incorrect.  This made this module unusable.

- Alzabo::ObjectCache::Sync::RDBMS caused weird random errors when
  used with MySQL's InnoDB tables.

- In the schema creator, the link to the graph page, and the link _on_
  the graph page to the image, were both broken.

- Alzabo was allowing you to rename a column to the name of an
  existing column in a table.  Similarly, a table could be renamed to
  the same name as an existing table.  Doing this could trash a
  schema.

- Alzabo::Runtime::Table->one_row would return undef if no row was
  found, which in a list context evaluated to a true value.

- Allow no_cache option when calling Alzabo::Runtime::Schema->join.

- When displaying SQL, the schema creator now makes sure to
  HTML-escape it, because it's possible to have HTML in there (in a
  default, most likely).

- The "children" method generated by Alzabo::MethodMaker did not allow
  you to add additional where clause constraints to the query.

---------------------------------------------------------------------------

0.69  September 19, 2002

ENHANCEMENTS:

- Add count method to Alzabo::DriverStatement objects.

BUG FIXES:

- ** A particularly nasty bug sometimes manifested itself when
  removing a foreign key.  This bug caused the deletion of all foreign
  keys involving the _corresponding_ column(s) in the foreign table.
  Needless to say, this could make a big mess.

- Fix some typos in the generated docs created by Alzabo::MethodMaker.

- A join that included a where clause with an 'OR' generated improper
  SQL.  Reported by Ilya Martynov.

- Calling the Alzabo::Runtime::JoinCursor->next_as_hash method when
  the query involved an outer join could cause a runtime error.

- In where clause specifications, 'and' and 'or' were only being
  allowed in lower-case.  They are now allowed in any case.

- Aliases did not work in outer joins.  This has been fixed.

- Using outer joins was a bit fragile, in that the order of the outer
  join in the context of the other joins could cause Alzabo to
  generate incorrect SQL.  Now outer joins should work no matter what.

- A couple links in the schema creator had a hardcoded ".mhtml"
  extension, as opposed to using the value of
  Alzabo::Config::mason_extension().  Patch by Scott Lanning.

---------------------------------------------------------------------------

0.68  July 20, 2002

ENHANCEMENTS:

- Updated the thank you list in the README file (you too can be listed
  by sending me useful bug reports, patches, suggestions, or reminding
  that you already did so and I forgot ;)

- Allow the Driver's ->schemas method to take connection params,
  wherever possible.  This allows Alzabo::Create::Schema methods like
  ->create, ->sync_backend_sql, and ->sync_backend to work properly
  when the database server is on another machine.  Patch by Ilya
  Martynov.

- Added Alzabo::Runtime::*Row->is_live method to easily distinguish
  between real and potential rows.

- Did some profiling of data retrieval (Alzabo::Runtime bits) and
  optimized some of the most heavily used pieces of Alzabo.

- Added the Alzabo::Runtime::Schema->prefetch_all and
  Alzabo::Runtime::Schema->prefetch_all_but_blobs convenience methods.

- Added a ->count method to the cursor classes.

- Added ->is_integer, ->is_floating_point, ->is_date, ->is_datetime,
->is_time, and ->generic_type methods to column objects.

- The Alzabo::Driver->schemas method now takes connection parameters.
  See your specific driver subclass for details on which.  Bug report
  by Ilya Martynov.

- Added Alzabo::Runtime::Schema->disconnect method.  Patch by Ilya
  Martynov.

- Make the Makefile.PL act gracefully when it is invoked without a
  tty.  Patch by Ilya Martynov.

- The quoting of identifiers (table/column names) is now optional, and
  _off_ by default.  In profiling I found that a non-trivial amount of
  time was being spent quoting these, and in most cases it's not
  necessary.  There is now a
  Alzabo::Runtime::Schema->set_quote_identifiers method that can be
  used to change this behavior.

  Identifiers are always quoted when using Alzabo::Create::* with
  Postgres, however.

- Did a fair amount of profiling in order to optimize Alzabo's data
  fetching.  In general, Alzabo::Runtime::* operations should be
  faster.

- Added Alzabo::Runtime::Column->alias which is useful when executing
  queries via the Alzabo::Runtime::Schema and Alzabo::Runtime::Table
  ->select methods.

BUG FIXES:

- Alzabo::MethodMake generated "lookup column/table" methods will
  return if there is no matching entry in the related table, which is
  important when the two tables are independent.  Previously it would
  have been a runtime error (attempting to call a method on an
  undefined value).

- Fix warning from Row->update.  Patch by Ilya Martynov.

- Alzabo::Runtime::PotentialRow's id_as_string method was misnamed id.
  The docs had it wrong for all classes.

- Catch where clauses that contain non-column/function objects as left
  hand side value (like if you accidentally pass in a table object).

- The Postgres TEXT column type is now considered a blob, not a
  character type column.

- There was a fatal error when creating an n-to-n relationship if only
  columns were given, without tables.  This was fixed with a patch
  from Dan Martinez.

- Explicitly check for errors after calling $dbh->func.

- There was a bug when trying to use the schema creator to create
  relationships involving more than one column.

Changes  view on Meta::CPAN


- Check out the mason/widgets directory for some handy widgets that
  can help integrate Mason and Alzabo in useful ways.  These aren't
  really well-documented yet but may be useful for playing with.  More
  widgets will be included in future releases (I hope).

- When creating a relationship between tables in the schema creator,
  you can now let Alzabo figure out which columns to use instead of
  choosing them yourself.  For most relationships, Alzabo will simply
  do the right thing, adding a column to one of the tables as needed.

- The problems running the tests with Postgres should now be fixed.

- Fix stupid and inefficient internal handling of "SELECT DISTINCT"
  queries.  Now Alzabo simply lets the database handle this, the way
  it should have in the first place.

- The Alzabo::Runtime::Schema and Alzabo::Runtime::Table ->function
  and ->select methods now allow you to select scalars so you can do
  things like SELECT 1 FROM Foo WHERE ... in order to test for the
  existence of a row.

- Added Alzabo::Table->primary_key_size method, which indicates how
  many columns participate in the table's primary key.

- Added Alzabo::Runtime::Schema->row_count.  Suggested by Daniel
  Gaspani.

- Alzabo now detects older versions of schemas and transparently
  updates them.  This will work for all schemas created with version
  0.55 or later.

  See the section titled "Backwards Compability" in Alzabo.pm for more
  details.

- Added comment attribute for tables, columns, and foreign keys.

- Add VARBIT and TIMESTAMPTZ as legal types for Postgres.

- Handle SERIAL columns in Postgres better.  Use the sequence Postgres
  creates for the columns rather than making our own and just insert
  undef into new rows for that column.

BUG FIXES:

- Adding a column that is not-nullable or has a default to a table
  under Postgres was causing an error with Postgres 7.2.1.  It seems
  likely that with earlier versions of Postgres, this was simply
  failing silently.  Patch by Daniel Gaspani.

- Fixed buggy handling of joins that had a table with a multi-column
  primary key as the "distinct" parameter.

- Calling the Alzabo::Runtime::Schema->join method with no 'select'
  parameter and a 'join' parameter that was an array reference of
  array references would fail.

- Avoid an uninit value in Alzabo::MethodMaker.  Reported by Daniel
  Gaspani.

- If you created a cursor inside an eval{} block, the cursor contained
  an object whose DESTROY method would overwrite $@ as it went out of
  scope when the eval block exited.  This could basically make it look
  like an exception had disappeared.  Thanks to Brad Bowman for an
  excellent bug report.

- Loading a schema failed in taint mode.  This was reported ages ago
  by Raul Nohea Goodness and dropped on the floor by me.  My bad.

- The schema creator's exception handling was a little bit buggered up
  when handling Alzabo::Exception::Driver exceptions.

---------------------------------------------------------------------------

0.64 Mar 27, 2002

ENHANCEMENTS:

- Added potentially useful script, alzabo_to_ascii, in eg/ dir.

- Ask for port when setting up tests.

- Turn on stacktraces for all Alzabo::Exception objects.

- Removed the deprecated "lookup_tables" option from
  Alzabo::MethodMaker.

- Removed the deprecated next_row methods from the various cursor
  classes.

- Removed the deprecated Alzabo::Runtime::Table->func method.

- Major changes to how joins are done.  It is now possible to mix
  together various sorts of outer joins in a single query.  In
  addition, it is now possible to specify a foreign key that should be
  used when joining two tables.

- The "tables" parameter has been renamed as "join".

- The Alzabo::Create::Schema->right_outer_join and
  Alzabo::Create::Schema->left_outer_join methods have been removed.
  Use the ->join method instead, which can now be used to do outer
  joins as well, via:

    $schema->join( join => [ left_outer_join => $foo, $bar ], ... )

- The functionality of Alzabo::Runtime::OuterJoinCursor has been
  merged into Alzabo::Runtime::JoinCursor.

- Alzabo::Exception::Driver->bind now returns an array reference, not
  an array.

BUG FIXES:

- Fix failure to load schema objects from file when $\ is set to
  something like "\n".  Reported by Brad Bowman.

- Fixed Postgres reverse engineering to work with slightly changed
  system tables in 7.2.

- Fix handling of table alterations for postgres.  Temp tables were
  being created but not dropped and the data saved in the temp table
  was not being restored to the real table.  Also, Alzabo was trying
  to create sequences again when altering tables Based mostly on a
  patch from Daniel Gaspani.

- Fix handling of primary key changes for Postgres (I'm still not sure
  it's entirely correct).

- Fix detection of primary key changes for schema diffs.

- Handle NOT IN for where conditions.

---------------------------------------------------------------------------

0.63 Feb 18, 2002

ENHANCEMENTS:

- Calling Alzabo::Runtime::Row->select or
  Alzabo::Runtime::Row->select_hash with no arguments returns the
  values for all of the columns in the table.  Suggested by Jeremy
  R. Semeiks.

- The Alzabo::Runtime::Row->id method has been renamed to id_as_string
  for the benefit of those crazy people who like to use "id" as a
  column name and want Alzabo::MethodMaker to be able to create such a
  method.  Suggested by Alexei Barantsev.

- Changed the Alzabo::Create::Schema->sync_backend method so that if
  there was no corresponding schema in the RDBMS, then it will
  instantiate a new schema instead of just blowing up.  Similarly, the
  sync_backend_sql method will just return the SQL necessary to create
  the schema from scratch.

BUG FIXES:

- Removing column attributes via the schema creator was broken.
  Adding them could have caused errors but generally worked.

- If you changed a column from non-sequenced to sequenced, the SQL
  "diff" was not reflecting this.

- Revert a previous change to MySQL reverse engineering.  Now default
  for numeric columns that are not 0 or 0.00 are used instead of being
  ignored.  The fact that MySQL has 'default defaults' _really_ screws
  things up.  Bad MySQL!

- A query that ended with a subgroup could not be followed with an
  order by or group by clause.  Bug report and test case submitted by
  Ilya Martynov.

- Nested subgroups in where clauses (like where => [ '(', '(', ....)
  were not being allowed.  Bug report and test case submitted by Ilya
  Martynov.

- Alzabo::MethodMaker would overwrite methods in the
  Alzabo::Runtime::Row/CachedRow/PotentialRow classes.  This has been
  fixed.  Reported by Alexei Barantsev.

- Allow order by clause to contain only a SQL function to allow things
  like "SELECT foo FROM Bar ORDER BY RAND()", which works with MySQL.

---------------------------------------------------------------------------

0.62 Jan 15, 2002

ENHANCEMENTS:

- Add support for IFNULL, NULLIF, and IF for MySQL.

- Document that Alzabo supports COALESCE and NULLIF for Postgres.

- Added Alzabo::ObjectCache::Sync::Mmap which uses Cache::Mmap.  This
  is just slightly slower than using SDBM_File.

- New table alias feature for making queries that join against a table
  more than once.  An example:

    my $foo_alias = $foo_tab->alias;

    my $cursor = $schema->join( select => $foo_tab,
                                tables => [ $foo_tab, $bar_tab, $foo_alias ],
                                where  => [ [ $bar_tab->column('baz'), '=', 10 ],
                                            [ $foo_alias->column('quux'), '=', 100 ] ],
                                order_by => $foo_alias->column('briz') );

  In this query, we want to get all the entries in the foo table based
  on a join between foo and bar with certain conditions.  However, we
  want to order the results by a _different_ criteria than that used
  for the join.  This doesn't necessarily happen often, but when it
  does its nice to be able to do it.  In SQL, this query would look
  something like this:

    SELECT foo.foo_id
    FROM   foo, bar, foo as foo1
    WHERE  foo.foo_id = bar.foo_id
      AND  bar.foo_id = foo1.foo_id
      AND  bar.baz = 10
      AND  foo1.quux = 100
    ORDER BY foo1.quux

FEATURE REMOVAL:

- It is no longer possible to pass sorting specifications ('ASC' or
  'DESC') as part of the group_by parameter.  This was only supported
  by MySQL and it was broken in MySQL until 3.23.47 anyway.  It's
  weird and non-standard.  Just use order_by instead.

BUG FIXES:

- If prefetch wasn't set, all the rows in the table were being
  pre-fetched.

- The newest Test::More (0.40) uses eval{} inside its isa_ok()
  function.  The test suite was passing $@ directly into isa_ok() and
  it would then get reset by the eval{} in the isa_ok() function.
  This has been fixed by copying $@ into another variable before
  passing it into isa_ok().  Apparently, Test::More 0.41 will fix this
  as well.

- Make Alzabo::ObjectCache::Store::RDBMS and
  Alzabo::ObjectCache::Sync::RDBMS play nice with Postgres.  Postgres
  aborts transactions when there are errors like an attempt to insert
  a duplicate inside a transaction.  These module would just try to
  insert potentially duplicate rows and ignore the error.  Now
  Postgres is handled specially.

- If you told the installer that you didn't want to run any tests with
  a live database, there would be errors when it tried to run
  03-runtime.t.  Now it just skips it.

- Alzabo includes a script called 'pod_merge.pl' that is run before
  installing its modules.  This script merges POD from a parent class
  into a child class (like from Alzabo::Table into
  Alzabo::Create::Table) in order to get all the relevant
  documentation in one place.  The way the Makefile.PL ran this script
  was not working for some people, and in addition, did not end up
  putting the merged documentation into the generated man pages.  This
  release includes a patch from Ilya Martynov that fixes both of these
  problems.

---------------------------------------------------------------------------

0.61 Dec 25, 2001

ENHANCEMENTS:

- Improve documentation for new Alzabo::Create::Schema->sync_backend
  method and note its caveats.

- It is now possible to use SQL functions as part of order_by clauses.
  For example:

    my $cursor = $schema->select( select => [ COUNT('*'), $id_col ],
                                  tables => [ $foo_tab, $bar_tab ],
                                  group_by => $id_col,
                                  order_by => [ COUNT('*'), 'DESC' ] );

- Allow a call to Alzabo::Runtime::Table->insert without a values
  parameter.  This is potentially useful for tables where the primary
  key is sequenced and the other columns have defaults or are
  NULLable.  Patch by Ilya Martynov.

BUG FIXES:

- A call to the schema class's select or function methods that had
  both an order_by and group_by parameter would fail because it tried
  to process the order by clause before the group by clause.

- When thawing potential row objects, Alzabo was trying to stick them
  into the cache, which may have worked before but not now, and should
  be avoided anyway.

- The parent and children methods created by Alzabo::MethodMaker were
  incorrect (and unfortunately the tests of this feature were hosed
  too).

- Add YEAR as exportable function from Alzabo::SQLMaker::MySQL.

- Fix definition of WEEK and YEARWEEK functions exported from
  Alzabo::SQLMaker::MySQL to accept 1 or 2 parameters.

- A bug in the caching code was throwing an exception when attempting
  to update objects that weren't expired.  This only seemed to occur
  in conjuction with the prefetch functionality.  The caching code has
  been simplified a bit and is hopefully now bug-free (I can dream,
  can't I?).

- Make it possible to call Alzabo::Runtime::Schema->join with only one
  table in the tables parameter.  This is useful if you are
  constructing your join at runtime and you don't know how many tables
  you'll end up with.

- Where clauses that began with '(' were not working.  Reported (with
  a test suite patch) by Ilya Martynov.

- Where clauses that contained something like ( ')', 'and' (or 'or') )
  were not working either.

- This file incorrectly thanked TJ Mather for separating out
  Class::Factory::Util, but this was done by Terrence Brannon.  Oops,
  brain fart.

- Improve the recognition of more defaults that MySQL uses for column
  lengths and defaults, in order to improve reverse engineering.

- Recognize defaults like 0 or '' for MySQL.

- Fix Alzabo::Create::Schema->sync_backend method.

---------------------------------------------------------------------------

0.60 Dec 6, 2001

ENHANCEMENTS:

- When passing order_by specifications, it is now possible to do this:

    order_by => [ $col1, $col2, 'DESC', $col3, 'ASC' ]

  which allow for multiple levels of sorting as well as being much
  simpler to remember.

- It is now possible to do something like

    $table->select( select => [ 1, $column ] ... );

  and have it work.  In this case, every row returned by the cursor
  will have 1 as its first element.

- Added Alzabo::MySQL and Alzabo::PostgreSQL POD pages.  These pages
  document how Alzabo does (or does not) support various RDBMS
  specific features.

- Remove Alzabo::Util.  Use Class::Factory::Util from CPAN instead.
  Class::Factory::Util is a slight revision of Alzabo::Util that has
  been separated from the Alzabo core code by Terrence Brannon.
  Thanks Terrence.

- Add the ability to sync the RDBMS backend to the current state of
  the Alzabo schema.  This allows you to arbitrarily update the RDBMS
  schema to match the current state of the Alzabo schema.

- Add support for SELECT and WHERE clauses that use MySQL's fulltext
  search features.

- Add BIT and BIT VARYING as allowed types for Postgres.

BUG FIXES:

- Reverse engineering was not checking for fulltext indexes with
  MySQL.  These indexes were treated the same as other indexes.

- Make sure Alzabo::SQLMaker always handles stringification of
  functions properly.

- Improve recognition of default column lengths under MySQL (and
  ignore them).  Also improve recognition of default defaults (like
  '0000-00-00' for DATE columns) and ignore those.

- When using the BerkeleyDB module for object syncing or storage, the
  Berkeley DB code itself creates a number of temporary files.  These
  will now be created in the same directory as the storage/syncing
  file specified.

- Allow GROUP BY foo ASC/DESC for MySQL.  The MySQL manual claims this
  works.  In my testing, it accepts the syntax but doesn't actually
  respect the order requested.  Of course, you can always add order by
  clause with your group by and that seems to work just fine.

- Don't allow a GROUP BY clause to follow an ORDER BY clause.  The
  reverse is still allowed.

- MySQL: Allow fulltext indexes to include *text type columns without
  specifying a prefix.

- Dropping a column that had an index on it would cause an error in
  the generated SQL diff where Alzabo would drop the column and then
  try to drop (the now non-existent) index.  The fix is simply to drop
  the indexes first.

- Make caching code work under Perl 5.00503.

- Make code warnings clean (I think) under Perl 5.00503;

DEPRECATIONS:

- The way order_by and group_by parameters are passed has changed a
  bit.  In particular, this form:

    order_by => { columns => ..., sort => ... }

  has been deprecated in favor of a simpler syntax.

---------------------------------------------------------------------------

0.59 Nov 17, 2001

ENHANCEMENTS:

- Got rid of the post_select_hash hook and combined it with
  post_select, which now receives a hash reference.  Suggested by Ilya
  Martynov.

- Run all hooks inside Alzabo::Schema->run_in_transaction method to
  ensure database integrity in cases where your hooks might
  update/delete/insert data.  Suggested by Ilya Martynov.

- Added new Alzabo::Runtime::Table->select method.  This is just like
  the existing ->function method, but returns a cursor instead of the
  entire result set.

- Added a 'limit' parameter to the ->function method (also works for
  the ->select method).

- Added new Alzabo::Runtime::Schema->select method.  This is like the
  method of the same name in the table class but it allows for joins.

- Added new potential rows, which are objects with (largely) the same
  interface as regular rows, but which are not (yet) inserted into the
  database.  They are created via the new
  Alzabo::Runtime::Table->potential_row method.  Thanks to Ilya
  Martynov for suggestions and code for this feature.

- Added Alzabo::Runtime::Row->schema method.  Suggested by Ilya
  Martynov.

- Made it possible to use Storable to freeze and thaw any type of row
  object.  Previously, this would have worked but would have
  serialized basically every single Alzabo object in memory (whee!).
  Patch by Ilya Martynov.

- Make Alzabo::Schema->run_in_transaction preserve scalar/array
  context and return whatever was returned by the wrapped code.

BUG FIXES:

- Did some review and cleanup of the exception handling code.  There
  were some places where exceptions were being handled in an unsafe
  manner as well as some spots where exception objects should have
  been thrown that were just using die.

- Ignore failure to rollback for MySQL when not using transactional
  table.

- Alzabo was not handling the BETWEEN operator in where clauses
  properly.  Patch by Eric Hillman.

- Passing in something like this to rows_where:

    ( where => [ $col_foo, '=', 1,
                 $col_bar, '=', 2 ] )

  worked when it shouldn't.

- Trying to do a select that involved a group by and a limit was not
  being allowed.

INCOMPATIBILITIES:

- Got rid of the post_select_hash hook and combined it with
  post_select, which now receives a hash reference.

---------------------------------------------------------------------------

0.58 Oct 18, 2001

ENHANCEMENTS:

- Added new insert_hooks, update_hooks, select_hooks, and delete_hooks
  options to Alzabo::MethodMaker.  Suggested by Ilya Martynov.

- Moved all the important document for the object caching system into
  Alzabo::ObjectCache, including the import options for all of the
  various modules.

- Added Alzabo::ObjectCache::Sync::RDBMS &
  Alzabo::ObjectCache::Store::RDBMS.  The former finally allows
  synchronization of multiple processes across multiple machines!

- Add Alzabo::Schema->has_table and Alzabo::Table->has_column methods.

- Make BYTEA a legal column type for postgres.  This is treated as a
  blob type.

BUG FIXES:

- The way cardinality and dependency was being represented in the
  schema graphs was sometimes backward and sometimes just broken.

- Fixed Alzabo::ObjectCache::Store::BerkeleyDB->clear, which was not
  actually doing anything.  Added tests that catch this.

- The lookup_tables option, which was deprecated in 0.57, was not
  being allowed at all.

- Calls to select_hash on cached rows were not going through the cache
  checking routines, possibly returning expired data.  Added tests for
  this.

- Eliminate race condition in Alzabo::ObjectCache::Sync::BerkeleyDB.

- The Alzabo::Runtime::Row->rows_by_foreign_key method wasn't doing
  quite what it said.  In cases where there was a 1..1 or n..1
  relationship to columns that were not the table's primary key, a
  cursor would be returned instead of a single row.  Reported by Ilya
  Martynov.

- Alzabo::MethoMaker could generate 'subroutine foo redefined'
  warnings .  Reported by Ilya Martynov.

- Fixed clear method for all Alzabo::ObjectCache::Store::* modules.

DEPRECATIONS:

- The insert and update options for Alzabo::MethodMaker have been
  deprecated.  They have been replaced by the new insert_hooks and
  update_hooks options, along with new select_hooks and delete_hooks
  options.

INCOMPATIBILITIES:

- If you specify give the 'all' parameter to MethodMaker, 'insert' and
  'update' are no longer included.

---------------------------------------------------------------------------

0.57 Oct 9, 2001

ENHANCEMENTS:

- When MethodMaker creates 'row_column' methods, these are now get/set
  methods.

- Added new lookup_columns option to MethodMaker (like lookup_tables
  but more flexible).  This replaces the now deprecated lookup_tables
  option.  See DEPRECATIONS and INCOMPATIBILITIES for more details.

- Added the ability to make any storage cache module an LRU.  Simply
  pass an lru_size parameter to Alzabo::ObjectCache when using it and
  the storage module will be an LRU cache.

- Documented Alzabo's referential integrity rules in Alzabo.pm
  (perldoc Alzabo).

- Added section on optimizing memory usage to Alzabo::FAQ.

- Alzabo::Runtime::Schema->join now takes a parameter called
  'distinct'.  This is useful in situations where you are joining
  between several tables but don't want rows back from all of them.
  In that case, it is possible that you could end up getting more
  duplicates than you need.  This parameter can help you eliminate
  those.

- Add the following Alzabo::Schema methods: begin_work, rollback,
  commit, run_in_transaction.

- If you have GraphViz installed the schema creator can now use it to
  show you a graph of your schema.

BUG FIXES:

- Fix handling of binary attribute for MySQL columns.  Generated SQL
  for creating/altering these columns may have been invalid
  previously.

Changes  view on Meta::CPAN

- Allow passing of port when executing SQL from schema creator.

- Confirm schema deletion in schema creator.

BUG FIXES:

- Quick hack to fix a problem with Alzabo::MethodMaker when using
  caching.  However, this requires that the caching modules be loaded
  first, before Alzabo::MethodMaker.  A more palatable fix will be in
  a future release.

- Fix a problem with prefetching rows that caused row objects to
  contain undefined values for certain columns.  This only happened if
  you were prefetching one column.

- Fix another problem that left the schema creator still broken.

---------------------------------------------------------------------------

0.42 Apr 25, 2001

BUG FIXES:

- The schema creator was broken (for lack of quotes around one string)

- Remove 255 char limit on prefix length (this needs more research).

---------------------------------------------------------------------------

0.41 Apr 24, 2001

BUG FIXES:

- 0.40 was missing a file in the distro
  (lib/Alzabo/ObjectCache/Sync/DBM.pm).

---------------------------------------------------------------------------

0.40 Apr 24, 2001

INCOMPATIBILITIES:

The classes in the ObjectCache hierarchy have been reorganized.  The
renaming is as follows:

  Alzabo::ObjectCache::MemoryStore => Alzabo::ObjectCache::Store::Memory
  Alzabo::ObjectCache::DBMSync     => Alzabo::ObjectCache::Sync::DB_File
  Alzabo::ObjectCache::IPCSync     => Alzabo::ObjectCache::Sync::IPC.pm
  Alzabo::ObjectCache::NullSync    => Alzabo::ObjectCache::Sync::Null.pm

ENHANCEMENTS:

- Document order by clauses for joins.

- Document limit clauses for joins and single table selects.

- Expand options for where clauses to allow 'OR' conditionals as well
  as subgroupings of conditional clauses.

- If you set prefetch columns for a table, these are now fetched along
  with other data for the table in a cursor, reducing the number of
  database SELECTs being done.

- Added Alzabo::Create::Schema->clone method.  This allows you to
  clone a schema object (except for the name, which must be changed as
  part of the cloning process).

- Using the profiler, I have improved some of the hot spots in the
  code.  I am not sure how noticeable these improvements are but I
  plan to do a lot more of this type of work in the future.

- Added the Alzabo::ObjectCache::Sync::BerkeleyDB and
  Alzabo::ObjectCache::Sync::SDBM_File modules.  These modules are
  much faster than the old DBMSync or IPCSync modules and actually
  appear to be faster than not syncing at all.  The NullSync (now
  Sync::Null) module is still faster than all of them, however.

BUG FIXES:

- Reversing engineering a MySQL schema with ENUM or SET columns may
  have caused an error if the values for the enum/set contained
  spaces.

- A bug in the schema creation interface made it impossible to create
  an index without a prefix.  Reported by Sam Horrocks.

- When dropping a table in Postgres, the sequences for its columns (if
  any), need to be dropped as well.  Adapted from a patch submitted by
  Sam Horrocks.

- The modules needed by the schema creator and data browser are now
  used by the components.  However, it is still better to load them at
  server startup in order to maximize shared memory.

- Calling the object cache's clear method did not work when using the
  IPCSync or NullSync modules.

- Reverse engineering a Postgres database was choking on char(n)
  columns, which are converted internally by Postgres into bpchar(n)
  columns.  This is now fixed (by converting them back during reverse
  engineering).

- Reject column prefixes > 255 with MySQL.  I hesitate to call this a
  bug fix since this appears to be undocumented in the MySQL docs.

- Using the DBMSync module in an environment which started as one user
  and then became another (like Apache) may have caused permiission
  problems with the dbm file.  This has been fixed.

MISC:

- Require DBD::Pg 0.97 (the latest version as of this writing) as it
  fixes some bugs in earlier versions.

ARCHITECTURE:

- Split up Row object into Alzabo::Runtime::Row (base class for
  standard uncached row) and Alzabo::Runtime::CachedRow (subclass for
  rows that have to interact with a cache).  This simplifies the code,
  particulary in terms of how it interacts with the caching system.

Changes  view on Meta::CPAN

- See the note above about the changes required to support
  multi-column foreign keys.

- Because of the aforementioned changes to the caching architecture,
  caching just does not work the way it used to.

  1. By default, there is no caching at all.

  2. To get the old behavior, which defaulted to an in-process memory
  cache with no inter-process syncing (meaning deletes are tracked but
  there is no such thing as expiration), you can do this in your code:

    use Alzabo::ObjectCache( store => 'Alzabo::ObjectCache::MemoryStore',
                             sync  => 'Alzabo::ObjectCache::NullSync' );

  or just:

    use Alzabo::ObjectCache;  # the above modules are the defaults

  3. To get the behavior of the old Alzabo::ObjectCacheIPC module, do:

    use Alzabo::ObjectCache( store => 'Alzabo::ObjectCache::MemoryStore',
                             sync  => 'Alzabo::ObjectCache::IPCSync' );

  However, the new DBMSync module will probably scale better, and
  performance should be about the same for smaller applications.  To
  use it, do:

    use Alzabo::ObjectCache( store => 'Alzabo::ObjectCache::MemoryStore',
                             sync  => 'Alzabo::ObjectCache::DBMSync' );

  4. If you run without any caching at all then the
  Alzabo::Runtime::Row class's behavior has changed somewhat.  In
  particular, selects or updates against a deleted object will always
  throw an Alzabo::Exception::NoSuchRow exception.  Before, the
  behavior wasn't very well defined.

  Please read the section on clearing the cache in the
  Alzabo::ObjectCache module, as this is an important concept.  By
  default, the caching and syncing modules will just grow unchecked.
  You need to clear at the appropriate points (usually your
  application's entry points) in order to keep them under control.

---------------------------------------------------------------------------

0.20 Jan 9, 2001

- Preliminary Postgres support.  There is no support yet for
  constraints or foreign keys when reverse engineering or making SQL.
  There is also no support for large objects (I'm hoping that 7.1 will
  be released soon so I won't have to think about this).  Otherwise,
  the support is about at the same level as MySQL support, though less
  mature.

- Added Alzabo::MethodMaker module.  This can be used to auto-generate
  useful methods for your schema/table/row objects based on the
  properties of your objects themselves.

- Reworking/expanding/clarifying/editing of the docs.

- Add order_by and limit options whenever creating a cursor.

- Method documentation POD from the Alzabo::* modules is merged into
  the relevant Alzabo::Create::* and Alzabo::Runtime::* modules during
  install.  This should make it easier to find what you need since the
  average user will only need to look at a few modules in
  Alzabo::Runtime::*.

- Reworked exceptions so they are all now
  Alzabo::Exception::Something.

- Added default as a column attribute (thus there are now
  Alzabo::Column->default and Alzabo::Create::Column->set_default
  methods).

- Added length & precision attributes for columns.  Both are set
  through the Alzabo::Create::Column->set_length method.

- This release includes a script in eg/ called convert.pl to convert
  older schemas.

- Alzabo::Schema->tables & Alzabo::Table->columns now take an optional
  list of tables/columns as an argument and return a list of matching
  objects.

- Added Alzabo::Column->has_attribute method.

- The data browser has actually lost some functionality (the
  filtering).  Making this more powerful is a fairly low priority at
  the moment.

- Fix bugs where extra params passed to Alzabo::Runtime::Table->insert
  were not making it to the Alzabo::Runtime::Row->new method.

- Fix for Alzabo::Runtime::Table->set_prefetch method.

- Fixed bug in handling of deleted object in Alzabo::ObjectCacheIPC
  (they were never reported as deleted).

- Fix bug that caused schema to get bigger every time it was saved.

- Finally switched to regular hashes for objects.

- Added Alzabo::SQLMaker classes to handle generating SQL in a
  cross-platform compatible way.

DEPRECATIONS:

- Parameters for Alzabo::Create::Column->new: 'null' parameter is now
  'nullable'.  The use of the parameter 'null' is deprecated.

- Alzabo::Column->null & Alzabo::Column->set_null methods are now
  Alzabo::Column->nullable & Alzabo::Column->set_nullable.  The old
  methods are deprecated.

- Alzabo::Create::ForeignKey->new no longer requires table_from &
  table_to params (it took me this long to realize I can get that from
  the column passed in.  doh!)

INCOMPATIBILITIES:

- Alzabo::Runtime::Table->rows_where parameters have changed.  The
  from parameter has been removed (use the
  Alzabo::Runtime::Schema->join method instead).  The where parameter
  expects something different now.

- Alzabo::Runtime::Table->rows_by_where_clause method has been
  removed.

- Alzabo::Runtime::Schema->join method's where parameter expects
  something different.

---------------------------------------------------------------------------

0.10_5 Oct 10, 2000

- You can now specify a database name to be used for testing.  The
  default is 'test_alzabo'.  This a good default for MySQL, at least.
  Thanks to Randal Schwartz for the help.

- Make sure test file cleanup is done _before_ attempting tests so
  that files from a test previously aborted are cleaned up (and no
  errors are generated.  Thanks to Randal Schwartz for the bug report.

- Doesn't fail on install for Mason components if no Mason component
  extension was given.  Thanks _again_ to Randal for working with me
  on this in IRC late at night.

---------------------------------------------------------------------------

0.10_4 Oct 10, 2000

- Fix Makefile.PL bug

- Auto select a column when adding a relation (if there is a logical
  one to select).

---------------------------------------------------------------------------

0.10_3

- Fix bug with deleting foreign key objects from tables.

---------------------------------------------------------------------------

0.10

  **FIRST BETA VERSION**

- Doc bug fixes in Alzabo::Runtime::Schema.

- Fix fact that Alzabo::Runtime::Row rows_by_foreign_key method could
  return either a Row _or_ RowCursor object.  Now it always returns a
  cursor object.

- Fix fact that no_cache parameter was not propagated through the
  RowCursor object to the rows it created.

- Add all all_rows method to Alzabo::Runtime::RowCursor.

- Add ability to reset instantiation flag in schema creation
  interface.

- Updated INSTALL to mention how to get the schema creator and data
  browser working.

- Finally make creating relations between tables _without_ specifying
  the columns work.  This does some, IMHO, pretty cool DWIMmery.

- Added primary_key param to Alzabo::Runtime::Table make_column
  method.

- Added set_host and host methods to Alzabo::Runtime::Schema.

- Added drop method to Alzabo::Create::Schema and necessary support in
  driver modules.

- Changed 'id' param to 'pk' for Alzabo::Runtime::Table row_by_pk
  method.  'id' still works, for now, but is deprecated.

- Fix problem where an insert could generate a referential integrity
  exception but still end up in the database.  Note, without
  transactions (in MySQL, for example), there's no way to make the all
  of the referential integrity code work correctly 100% of the time.

- Added new class Alzabo::ObjectCache to make sure that objects stay
  in sync after referential integrity operations happen.  This is now
  the default caching class.  Please make sure to read the docs for
  this new module, particularly if you're running Alzabo under a
  persistent environment where this module can be quite the memory hog
  if not used properly (clear the cache!).

- Fixed breakage in maintenance of referential integrity caused by
  switch to cursors (and me not fixing all the code that expected row
  objects).

- Added Alzabo::Runtime::Cursor base class.

- Added join method to Alzabo::Runtime::Schema.  *EXPERIMENTAL*

- Added Alzabo::Runtime::JoinCursor class.  *EXPERIMENTAL*

- Began conversion of all classes from pseudohash to hash.

- Both schema creator and data browser now respect user choice of
  component extension.

---------------------------------------------------------------------------

0.09

- MAJOR CHANGE: All the Alzabo::Runtime::Row methods that used to
  return lists of rows now return the new Alzabo::Runtime::RowCursor
  object.  This change is a major speed and memory optimization.  It
  does, however, break the old interface.  But its worth it.

- Set autohandlers for schema maker and data browser so that they
  won't inherit from other autohandlers higher up the directory tree.

- Fix bug in Alzabo::Driver which made it so that the one_row_hash
  method always returned a hash with keys.  This caused spurious row
  object to be created in the Alzabo::Runtime::Row class.

- Fix bug in Alzabo::Table::rows_where method where it wasn't handling
  the construct $table->rows_where( where => { foo => undef } )
  properly.

---------------------------------------------------------------------------

0.08

- Lazy column evaluation had made it possible to create an
  Alzabo::Runtime::Row object that did not correspond to any data in
  the database if its table object did specify any rows to prefetch.
  This would have only been discovered later by calling the select
  method on a non-primary key column.  This hole was plugged.

- As a corollary to the above change methods in Alzabo::Runtime::Table
  that produce rows now always return an empty list or undef when the
  rows cannot be made because the specified primary key doesn't exist.
  Previously, the rows_by_where_clause method did this while others
  would cause an exception either during the object creation or later,
  depending upon the situation described above.

- GENERAL NOTE: I probably used exceptions too much, as in the above
  case.  I will probably be making a few more changes like this in the
  future.

- Bug fix in Alzabo::RDBMSRules when making SQL diffs.  Forgot to
  account for new foreign key method names.

- Bug fix related to MySQL auto_increment column and
  Alzabo::Runtime::Table insert method.  Basically, you couldn't
  insert into a table and use its auto_increment feature.



( run in 0.559 second using v1.01-cache-2.11-cpan-5837b0d9d2c )