0.93 Wed Jul 2 2003
New Functionality
- Multi-column primary keys are now supported. [with huge thanks to Tim
Bunce]
- New syntax for inbuilt SQL
- classes can control stringification via as_string() and
stringify_column().
- set_sql automatically translates __TABLE__, __ESSENTIAL__, and
__IDENTIFIER__
Performance Improvements
- use Storable's dclone() rather than Data::Dumper's deepcopy
Documentation
- document the order_by option to search() [Drew Taylor]
- fix the documentation of the DBI connect string [Phil Crow]
- document working with pre_create triggers
- add a note on dynamically generating a database connection
- avoid using (shift => $val) due to quoting issues! [Simon Wilcox]
- refer to Class::DBI::Oracle for sequences [Jay Strauss]
- give better explanation for construct() [Jay Strauss]
- document get/set with multiple arguments [Jay Strauss]
- more detailed description of arguments to has_a()
Bug Fixes
- Bug with setting driver defaults [Jay Strauss + Schwern]
- Bug where selecting a column that was only in 'All' group also
attempted to fetch any TEMP columns. [Dominic Mitchell]
Removal of Functionality
- Undocumented ordered_search method has been removed in favour of
order_by option to search.
- Undocumented make_filter method removed in favour of add_constructor
- add_constructor no longer does (undocumented) %s substitutions
- (undocumented) single_value_select() method no longer takes raw
SQL fragments.
0.92 Sat Apr 12 2003
New Functionality
- classes named after reserved SQL words can now supply a
table_alias either directly, or as a second argument to table().
Deprecations
- hasa() now calls has_a() with a warning. It will disappear
completely in a forthcoming release.
- issue warning on use of old hasa_list
Bug Fixes
- class data properly propagates (i.e. two classes can once again
have has_a relationships of the same name) [Miyagawa + Marty]
- only deflate columns that are changing on update.
Other
- croak if update() does not change exactly one row [Tim Bunce].
(Not yet live)
- The Essential column group now defaults to Primary rather than
All.
0.91 Sat Mar 8 2003
New Functionality
- has_many can now take an extra set of search parameters at execution
- has_many mapping method can now be a list
- Class->delete(@search_args) deletes all results matching search
criteria.
- search can take a final hash of arguments. Currently the only one
honoured is 'order_by'
- searches deflate objects passed as search values as with has_a()
- iterators can be slice()d
- classes can provide their own iterators
- columns in the TEMP column group will be non-persistent
- set_sql automatically sets up a search_ method for that SQL
- constraints can cross-check using new syntax, and per_column
trigger points.
- the after_update trigger can modify the list of changed columns
to change refresh behaviour
- Can delete via the iterator: $cd->artists->delete_all
- New Class::DBI::Query module for dynamically constructing queries
- Standardised exception handling (thanks to Tim Bunce)
- on_failed_create no longer needed
- overloading of objects
- autoincrements work with SQLite
Deprecations
- commit() and autocommit() are now update() and autoupdate()
- rollback() is now discard_changes()
- hasa() now warns if used
- trigger points create() and delete() warn when called
- trigger point on_setting no longer exists
Optimisation
- has_a lazy inflates other Class::DBI instances
- roll our own require rather than depending on UNIVERSAL::require
(thanks to Tim Bunce)
- Don't add __Changed = {} to every object on creation,
just autovivify it on demand. (Tim)
- Avoid calling $self->primary_column in a loop in create() (Tim)
- Use fetchrow_arrayref instead of fetchrow_array. (Tim)
- Return from _deflated_column earlier if value is not a ref. (Tim)
- Use $sth->{NAME_lc} instead of $sth->{NAME}. (Tim)
- Optmize _normalized and normalize. (Tim)
- optimise various calls to columns() (Tim)
- don't reflesh after an update - defer for lazy loading
- Iterator no longer inherits from Class::DBI itself.
Bug Fixes
- has_many maps now work as iterators
- columns only report as being in group 'All' if they're in no
other columns (so lazy loading works in those cases!)
- calling create with a primary key of zero no longer attempts to
use auto_increment (Tim Bunce)
Other
- reference Class::DBI::AbstractSearch
- retrieve_from_sql removes any leading 'WHERE'
- inflate handles overloading better (thanks to Tim Bunce)
- Avoid boolean test on object, use defined instead.
- Tweak create() to prepare for possible caching of colmap info.
- better documentation on transactions
- test suite now uses DBD::SQLite instead of DBD::CSV
- consolidated some test scripts
0.90 Wed Nov 27 GMT 2002
- hasa and associated_class merged (and deprecated) into has_a
- has_many therefore no longer sets up reciprocal hasa
- allow search() and search_like() to take multiple columns
- added find_or_create()
- add_constructor() is now preferred to make_filter()
- added retrieve_from_sql() for inline SQL
- documented running arbitrary SQL and using sth_to_objects to
convert these to objects. (Making sth_to_objects public too)
- has_many can now call a mapping method on the results
(for simpler many-to-many joins, for example)
- has_many adds an 'add_to_<whatevers>' method
e.g. CD->has_many(tracks => Track);
now adds not just 'tracks' method, but also 'add_to_tracks'.
(thanks to Michael Styer)
- try to guess table name if none given
- speed up iterators (thanks to Tom Renfro)
- added (undocumented) data_type method
(thanks to Tatsuhiko Miyagawa)
- renamed column_type() to associated_class()
- added references to Class::DBI::SQLite, Class::DBI::Pg,
and Class::Join
- before_create trigger can now modify object itself
- uses UNIVERSAL::require instead of rolling our own
- marked primary_key(), is_column(), add_hook() as deprecated
- changed _ids_to_objects to receieve listref, rather than list
to cope with weird bug in 5.005_03 (thanks to Tatsuhiko Miyagawa)
- warn if column name clashes with built-in method
- third argument to has_many is now optional, defaulting to our
'class-name' (undocumented)
- provide normalised method names if appropriate (i.e. a Film column
will give us methods $obj->Film and $obj->film). This previously
happened inconsistently.
- split most of the column related code to Class::DBI::Columns
- remove dependency on Class::Fields
- reference the new Class::DBI mailing lists
- Give better errors if no database connection set up
(thanks to Simon Cozens)
- A failed create now calls $class->on_failed_create, which by
default dies, but can be made to do whatever you like.
0.89 Mon Jun 24 2002
- allow has_many to not have a relationship
(Thanks to Brian Parker)
- renamed (undocumented) min() and max() to
minimum_value_of() and maximum_value_of()
- croak() and carp() deprecated in favour of _croak() and _carp()
- primary() and essential() deprecated in favour of
primary_key() and _essential()/columns(essential);
- normalize_one() deprecated in favour of _normalize_one
- If a 'might-have' link points to nothing, don't give a 'Can't call
method' error
- better reporting on errors from create etc.
- better reporting when you incorrectly set through hasa()
- handle primary/foreign key value of zero better
(reported by Jim O'Brien)
- added (undocumented) 'column_type' based on ideas from
Matthew Simon Cavalletto and Tatsuhiko Miyagawa.
- brought delete triggers in line with documentation
(reported by Barry Hoggard, fixed by Tatsuhiko Miyagawa)
0.88 Beltane 2000
- fix for hasa() and create() with modified accessor/mutator names
(Thanks to Schwern)
0.87 Fri Mar 29 2002
* added might_have method
- better MySQL autoincrement code (fixes occassional problems
under mod_perl) [Thanks to Tatsuhiko Miyagawa]
- fixed a test that was failing on 5.005 (but not 5.6.1) due to weird
interaction between overloaded iterator and Test::More's ok()
prototype [Thanks to Tatsuhiko Miyagawa]
0.86 Fri Mar 8 GMT 2002
* removed support for pseudo-hashes
* hasa_list is now has_many
(although has_many still exists for backwards compatability)
+ has_many auto-generates reciprocal hasa decalaration
(unless called as hasa_list, or with { nohasa => 1 })
* searches now return iterators when used in scalar context
- hooks are now called 'triggers' (using Class::Trigger)
* new trigger for SELECT
* added basic constraints
+ added support for filters on the same column
(%s >= ? OR %s <= ?)
+ added 'between' filter which provides this
- deal better with the case where the only column group is 'All'
- much internal twiddly stuff
0.36 Wed Nov 28 2001
+ tests no loner die horribly if you don't have MySQL installed
- minor tweaks to some error messages
- bugfixes for problems with auto-deleting objects
- bugfix for mis-normalized accessor warning
(thanks to Schwern)
0.35 Sun Oct 7 2001
+ added hooks for create, update and delete
- split commit() for easier subclassing
0.34 Sat Oct 6 2001
- Don't die if a value is a reference. (Ima::DBI does this for us,
and better in case of overloaded objects)
- fix minor problem with mutual hasa / hasa_list referencing
- better diagnostics if hasa_list is miscalled
0.33 Sat Sep 15 2001
+ Added create_filter(), and with it retrieve_all()
+ added docs on how to set-up many-to-many relationships
+ _cascade delete now split out to allow overriding
+ copy() and move() can now take multiple arguments to change
(thanks to Jonathan Swartz)
0.32 Sun Sep 9 2001
+ delete() now removes any foreign elements, to avoid orphans
0.31 Sun Sep 9 2001
+ split out _column_placeholder (thanks to Jonathan Swartz)
+ added hasa() checks for orphaned rows
0.29 Wed Sep 5 10:24:54 BST 2001
+ split docs into Class::DBI::Tutorial
+ renamed is_column to has_column (is_column still provided as alias)
+ added accessor_name and mutator_name form template methods
- _load_class didn't work. Now fixed.
- _next_in_sequence was broken, and would warn even if it wasn't.
- better diagnostics when you call retrieve incorrectly
0.28 Wed Aug 29 20:02:28 BST 2001
+ Tony Bowden took over maintenance
* Added hasa_list
- Fixed bug with inherited columns (reported by Boris Mouzykantskii)
- move() and copy() were broken with auto_increments. Now fixed.
- set() did bad things if you'd set up new fields with
mk_accessors (reported by Boris Mouzykantskii). Now fixed.
- Better errors when calling create() incorrectly
- Split tests into distinct files (DBD::CSV now required)
- General internal tidying
0.27 Mon Apr 23 09:04:51 BST 2001
* Class::DBI->new() deprecated in favor of create()
- Fixed the 'Primary before All' bug reported by Tony Bowden
0.26 Mon Apr 9 14:32:17 BST 2001
- Class->columns('All', @cols) now assumes the first column to be
your primary.
- Class->columns('Essential', @cols) now automatically includes
the primary column.
* move() was broken. Works and tested.
- Updated our base requirement to get at its bugfix
- Updated our Ima::DBI requirement to get at commit() and rollback()
* Documented construct()
* Added docs about transactions
* Added dbi_commit() and dbi_rollback()
- Added docs about Class::DBI and mod_perl
0.25 Wed Jan 10 01:54:27 EST 2001
- The new ID is now optional for copy()
* Added move() to move objects between classes/databases.
- Updated PG's default attributes.
- Made the way classes are loaded with hasa() safer
0.24 Thu Oct 5 19:07:21 EDT 2000 *UNRELEASED*
- Fixed some $@ naughtiness. Errors should propigate properly.
* Added default database attributes for Pg, MySQL, Oracle, DBD::CSV and
DBD::RAM. Class::DBI should work out of the box with them now.
0.23 Tue Sep 12 00:33:38 EDT 2000
- rollback() needed to normalize its data (thanks to Greg Bartlett)
0.22 Sun Sep 10 05:36:51 GMT 2000 *UNRELEASED*
- Added a warning if the primary column is not in the essential group
0.21 Sun Sep 10 01:03:01 EDT 2000 *UNRELEASED*
- Now requiring Ima::DBI 0.24
- sequence() fixed, tested and working
- Now working with DBD::Pg and PostgreSQL 7.0
0.20 Sun Sep 10 00:29:15 EDT 2000 *UNRELEASED*
- *bug_fix* is_column() died if false.
0.19 Fri Sep 8 15:07:49 EDT 2000
- Forgot to update the Changes file.
0.18 Fri Sep 9 18:51:45 GMT 2000
* new() now accepts Class::DBI objects as values
- hasa() is now inherited properly
- normalize() will now take an empty array
0.17 Mon Sep 4 02:46:25 GMT 2000 *UNRELEASED*
- Docs forgot to turn AutoCommit on in MySQL examples
- Documented the behavior of new() and AUTO_INCREMENT
- Added support for sequences. *Untested*
- *bug fix* columns() can now be added after the class has been used
- *bug fix* Columns added by hasa() had a chance of overwriting each
other.
0.16 Sun Sep 3 17:49:08 GMT 2000 *UNRELEASED*
* hasa() will now attempt to require the foreign class for you
* hasa() will setup the necessary columns for you.
0.15 Sun Jul 16 23:14:20 PDT 2000
- Fixed minor bug in DESTROY message.
* Added hasa() object relationships.
0.14 Sun Jul 9 05:25:53 EDT 2000
- Pseudohashes as objects now work and basicly tested
- The rollback() mechanism changed to use less memory.
- Expanded the TODO list
0.13 Wed May 24 02:45:43 EDT 2000
- Accessors were not being generated properly in certain cases.
0.12 Tue May 23 ish... * Unreleased*
0.11
- Aborted attempts to fix accessor misgeneration.
0.10 Thu May 18 00:59:34 EDT 2000
- new() was not working with objects which autogenerated primary keys
0.09 Tue May 2 00:42:06 EDT 2000
- README, INSTALL and Makefile.PL have been updated
0.08 Mon May 1 20:27:13 EDT 2000
- Documented lazy column population.
0.07 Mon May 1 02:18:20 EDT 2000 * Unreleased *
* Added lazy population of columns.
- columns('All') can now be autogenerated.
0.06 Mon May 1 00:56:52 EDT 2000 * Unreleased *
* **API CHANGE** make_sql() is gone in favor of set_sql()
* normalization has been added in all the right places.
- retreive now handles autoincremented primary keys.
- columns() internally normalizes column names.
0.05 Sat Apr 15 01:48:25 EDT 2000
* MAJOR BUG - simple subclasses of subclasses of Class::DBI would not
work. This has been fixed.
* Autoloader eliminated.
* API CHANGE - columns must now be explictly declared, the class's
public data members are not used. That was silly.
* rollback() now works.
- is_changed() now returns a list of changed columns
0.03 Mon Dec 20 10:04:23 EST 1999
* MAJOR BUG - commit() was not committing!!!
* added is_changed()
- columns('Essential') now autogenerated from columns('All') if not
already present.
- columns('Essential') is now prefered for most SELECT statements
instead of just columns().
0.02
* First working version
* First version sent to CPAN