[Dbix-class] API Changes: method renaming
Dan Kubb
dan.kubb at autopilotmarketing.com
Sun Aug 7 00:05:09 CEST 2005
After discussing some inconsistencies in the API with Matt on IRC, I've
changed some of the method names in DBIx::Class::Table to be more
consistent.
The changes are summarized in the following table. The first column
is the class name the second is the old method name, and the new
method name is the third column:
DBIx::Class::PK retrieve -> find
DBIx::Class::Table retrieve_from_sql -> search_literal
DBIx::Class::Table count_from_sql -> count_literal
DBIx::Class::Table->retrieve_all method has been removed, in favor
of just using DBIx::Class::Table->search({}).
The DBIx::Class::CDBICompat::Retrieve class has been added to the
CDBI Compat later to account for the changes.
In the future all methods used to perform queries will follow a
simple naming convention:
find* -> returns a single record (a matching record)
search* -> returns a resultset in scalar context, or $rs->all
in list context (all matching records)
--
Dan Kubb
More information about the Dbix-class
mailing list