Revision history for Perl extension Jifty::DBI. 0.34 Sun Jan 28 21:28:00 CST 2007 - Added a method to the schema generator to output the SQL for a single column 0.32 Fri Jan 26 20:51:12 CST 2007 - Improved deprecation warning for "length is 42": Due to an incompatible API change, the "length" field in Jifty::DBI columns has been renamed to "max_length": column foo => length is 10; # NOT VALID Please write this instead: column foo => max_length is 10 # VALID - Calling 'column' within a schema class is deprecated: package TestApp::Address::Schema; column address => ...; # NOT VALID Please write this instead: package TestApp::Address; use Jifty::DBI::Schema; use Jifty::DBI::Record schema { column address => ...; # VALID }; 0.31 Fri Jan 26 19:52:08 CST 2007 - load, load_by_cols, load_from_hash and create are now optionally class methods. - "length is 42" in schema declarations is deprecated; please write "max_length is 42" instead. - Jifty::DBI::Collection - document the "LIKE" and "MATCHES" limit operators correctly. 0.30 Wed Jan 17 15:29:44 EST 2007 - update version dependency on DateTime to 0.34 - fixed a "use of uninitialized value" warning in the tests. [t/01records.t] - Make sure we don't go looking for the validate_COLUMN sub everytime for columns without validators (thanks to Alex for pointing that out) - Fix bug where validator_COLUMN subs weren't getting set as validators (thanks to Audrey for help) - Test that the declarative syntax automagically sets validators as it should (these fail at the moment, though a fix should be forthcoming) - fixed the "order_by" bug in sub distinct_query. [Jifty::DBI::Handle::Pg] - added unit tests for the Handle::Pg patch. [t/14handle-pg.t] - fixed the desc string in the last test. [t/13collection.t] - made _order_clause more flexible by dealing with empty aliases [lib/Jifty/DBI/Collection.pm] - added one test for it. [t/13collection.t] - added t/13collection.t to test methods in Jifty::DBI::Collection. - Jifty::DBI::Handle::ODBC - Bring in the missing build_dsn method from DBIx::SearchBuilder such that this backend can work again. Requested by: agentzh++ - Jifty::DBI::Column - Recognize "is autocompleted". - Jifty::DBI::Collection - The "function" argument to the "column" method was broken when passed with trailing "?" characters. - Also clean up the documentation about ->distinct_required. - Jifty::DBI::Collection - Document the long-undocumented ->column method. - Jifty::DBI::Handle::ODBC - Doc fixup and author name fixup. - Jifty::DBI::Schema - Add "is autocompleted". - Jifty::DBI::Schema - Backport "order is 3" as alias of "sort_order is 3" from Jifty::Param land. - Make "valid are ..." an alias for "valid_values are ..." for real. - add 'is indexed' syntax to the declaritive schema generator - remove sort, it causes CREATE INDEX to run before CREATE TABLE - add sqlite sql so that these tests run without needing postgres configured - reorganize the code so its easier to add more databases later, and uses util.pl more - Jifty::DBI::Collection - More CORE::join() to avoid warnings. - Jifty::DBI::Collection: Pass through the arguments to L to L and on to L - import Carp::croak so the error message in apply works 0.28, 0.29 Thu Nov 23 22:11:37 EST 2006 * The last upload didn't take 0.27 Thu Nov 23 22:06:09 EST 2006 * Initial implementation of prefetching for related records and collections 0.26 Mon Nov 13 11:11:31 EST 2006 Usability * avoid a warning in Jifty::DBI::Schema when our user is executing a .pm file. When that is the case, caller(1) is not defined. --gaal * Small error string change to suggest looking for missing use lines in models where refer_to is used --bartb Core code * fixed sort_order setting in Jifty::DBI::Schema --wolfgang * Don't use main.*, ever. --clkao * Jifty::DBI::Schema - Backport "valid are qw(...)" and "render as '...'" support from Jifty::Param::Schema as aliases to "valid_values are" and "render_as". --audreyt * added as_hash to Jifty::DBI::Record --jesse * @ISA => use base --schwern * Use DBIx::DBScehma::Column and ::Table rather than trust that DBIx::DBScehma will load them. --schwern Installation * Bump DateTime dependency, as older versions didn't provide the API we're using. (0.22 is known bad) --jesse (Thanks to Matt Trout) Testing * make sure to skip 04memcached.t if you don't have Cache::Memcached --ishigaki * Tests updated to not have $sth in scope when we $dbh->disconnect Doc * demonstrate the valid_values alternate syntax that allows display and value to be separate * Document columns and column --schwern * Minor changes to pod --evdb 0.25 Tue Sep 12 23:52:45 BST 2006 * cleaned up DSN generation. * Allowed arbitrary parameter specification in DSNs * Corrected the method name "DSN" to "dsn" throughout. * ( If a user tries to load a record by columns that happen ot be foriegn keys, and values that are objects, do the right thing * Propery cache DBI::Record entries when aliased. * Fewer accessor calls. * Only apply filters if we have values fetched. * make passing a J:D:Collection as a value DTRT * Jifty::DBI::Schema - s/die/croak/ to aid debugging. * Refactor Jifty::DBI::Filter::Date to be a subclass of ::Filter::DateTime. * New ::Filter::Time filter for time of day. ('time' sql type). * Update to Module::Install 0.64 to fix auto_install() when Makefile.PL is run from the command line and CPANPLUS is not installed. * The number of fixed tests in t/10schema.t for Jifty::DBI was wrong. * documented limit a bit more * JDBI::Filter::Date clones dates before setting timezone, so that we don't alter the object we're passed. * Spelling fixes. * Remove the @ISA-mocking code from Jifty::DBI::Schema, so that use MyApp::Record schema { ...; } can work even if MyApp::Record overrides Jifty::Record's column building methods. We do that by arranging the schema callback to run after the @ISA chain is set up. * Jifty::DBI::Schema - defer initialization for columns created via the schema{} wrapper, so that users can continue to define column names that overlaps with the helper functions, such as "label" and "type". * attempt to test "label" and "type" column definitions. however, as I don't have Pg, I cannot run this test; help welcome. * cleaned up case sensitivity code * fixed SQLite docs * abstract out checking whether it's possible to make a clause case insensitive so that subclasses of Handle can use those tests * doc'd Filter::DateTime special behavior when the column type is 'date' * Adding a filter to salt and hash passwords * Adding an after_set hook to Jifty::DBI::Record * Jifty::DBI::Schema: Lift the restriction to use another ::Schema package on the record model class; you can now directly write: package Wifty::Model::Page; use Jifty::DBI::Schema; schema { # ... your columns here ... }; because &schema will unregister all symbols exported by Jifty::DBI::Schema after it runs the column initialization code. Backward compatibility is preserved -- as long as you don't name your record model "Schema"... * update the testmodels.pl to use new schema decl syntax * Lift the call of schema to BEGIN time: * fixed handling of case sensitivity and numeric columns so opertions like '>' do numeric instead of lexical comparisons * Allow collection SELECTs to have preload_columns defined. * Case insensitive searches should be, euh, case insensitive in Pg * Mark case-sensitive tests as TODO for MySQL * drop ::Cachable::new as it does nothing * add cache tests: columns names are case insensetive so we should generate cache key insenstive too ::Cachable::_gen_record_cache_key * hash key couldn't be undefined, but '' and 0 are different keys * values undef, 0 and '' are different, use '__undef' only when it's really undef * apply the same logic when $value is hash reference * use lower case for key part ::Cachable::load_from_cache * don't generate PK cache key, we do that in subcequent _store call ::Cachable::__set * don't create local arguments hash, just pass @_ throught ::Cachable::__delete * don't eat arguments, may be somebody wants to subclass and pass arguments to delete. ::Cachable::_fetch * fetch again only when we found something in cache with keys' aliases ::Cachable::_primary_record_cache_key * avoid check for $self->id definess as if it's undef then record couldn't have pk cache key * use $self->primary_keys to get columns of the PK and its values, as result we get support for compound PKs here * Mark undef PK loading as TODO * Only mark the one failing test under mysql as TODO * make Collection smart about guessing table names * removed a lie from create() pod * Make _open_paren and _close_paren into public methods open_paren and close_paren 0.24 Tue Aug 8 23:33:34 EDT 2006 * artificial version increment 0.23 Thu Jun 15 14:12:20 CEST 2006 * Add tests for case sensitivity in limits * Caching for columns and readable/writable attributes. Only gains us 2% performance. But hey. 2% free * Added DateTime::Format::Strptime to requires * Do fewer ->COLUMNS calls from ->column, and do fewer ->column calls from ->value. * Make Jifty::DBI::Record::_init() expect a hash like Jifty::Record does * Fixes 'is_distinct' failure when used in Jifty * Use Class::Accessor::Fast. * Remove Carp::cluck, as it hates END and vice versa. * Integrate today's hack for dumping callers for sql queries in question. * Add tests for case sensitivity in limits * Integrate today's hack for dumping callers for sql queries in question. * Enforce mandatory things at a Jifty::DBI layer * Cleanup 'distinct' column check and tests * Tests for column constraints 'mandatory' and 'distinct' * Implement support for 'distinct' column checks * Perltidy * Set validator on the column to validate_whatever (even if it's just the autogenerated one) * Update Module::Install to 0.21+ to prevent make loop; also avoid the use of "our" in VERSION strings for compat with older MMs. (Ditto with the previous commit) * Oracle fixes from Mark Gardner * Jifty::DBI::Filter::Storable - Do not die when the storable image is somehow corrupt; instead, simply return undef. * upgrade inc/ trees to 0.62+ to reflect the version::vpp fix. * Jifty::DBI::Collection - minor POD style and typo fix. * add_record now works on empty collections * removed a debug warning from alex * Enforce "default is ''" on columns * Document the use and behavior of refers_to * Cache::Memcached was being tested whether or not it was installed. Thanks to Matt Trout * Fixed Pod typo * Doc fixes relating to filters * lib/Jifty/DBI/Record.pm - removed incorrect '=for' directive * lib/Jifty/DBI/SchemaGenerator.pm - removed incorrect '=for' directive * t/01-version_checks.t - test for CPAN VERSION parsing hang-ups * lib/Jifty/DBI/Record.pm - added Class::ReturnValue's to disallowed accessors * lib/Jifty/DBI/Record.pm - do not try to set_() a collection * t/11schema_records.t - added tests for trying to set a collection * t/10schema.t - silence undef warning * lib/Jifty/DBI/Record.pm - catch attempts to set a refers_to * lib/Jifty/DBI/SchemaGenerator.pm - crediting myself per Jesse's suggestion :-O (ewilhelm) * lib/Jifty/DBI/SchemaGenerator.pm - pod edits: Redid synopsis with real example -- maybe somewhat incorrect WRT Model::Schema, but it does work. Stripped boilerplate sections. Clarified add_model $model requirement. Cleanup odd =for public... pod bits. Spelling fix. * lib/Jifty/DBI/Handle.pm - documentation fixes/cleanup * created an api to allow distinct toggling 0.21 Wed May 3 14:14:41 EDT 2006 * We no longer do a count when setting up a collection's pager object by default * order_by now returns the current orders * added a "do_search" method to force a search, say before a count * Added a filter for Dates, lib/Jifty/DBI/Filter/Date.pm * Switched Jifty::DBI::Record to autocreate methods on object load rather than use AUTOLOAD. 0.20 Fri Apr 21 10:23:14 EDT 2006 * Documentation updates and misc bugfixes from Eric Wilhelm * Performance optimization for the "standard case" of __value * Postgres sequence parsing fix from Daniel Tabuenca 0.19 Sun Apr 2 18:59:53 JST 2006 * Columns now have a "sort_order" attribute. This way when auto-rendering forms, we can render them by "order defined" rather than just alphabetically. - idea by Tatsuhiko Miyagawa 0.18 Fri Mar 31 22:15:59 JST 2006 * Test fixes to remove databases after testing. This fixes Win32 test failures. -- Kenichi Ishigaki * Added "filters" method to records, which adds both input_filters and output_filters. 0.17 Sun Mar 5 00:41:41 PST 2006 * Memcached correctness fixes 0.16 Sat Mar 4 18:02:44 PST 2006 * Memcached installation fixes 0.15 * Added support for Memcached * Updated record docs to show hooks 0.09 Thu Dec 29 07:56:30 EST 2005 * Fixed dependency on Class::Data::Inheritable * Audrey Tang added "smarter" schema declaration processing to get us warnings on bogus usage. 0.08 Sun Dec 25 14:34:12 EST 2005 * Added a missing prereq: Exporter::Lite. Thanks to sri 0.06 Fri Dec 23 15:44:17 EST 2005 * Added more tests for mysql and Pg now that DBSchema supports them. Tests want more love 0.05_03 Forward-ported features from DBIx::SearchBuilder: 1.37_01 Thu Dec 8 15:56:50 EST 2005 * Switched Postgres sequence lookups to use CURRVAL, rather than OIDs 1.36 Fri Dec 2 18:04:21 EST 2005 * Change to how we resolve virtual columns to deal with a "no such attribute" bug in RT 1.35 Wed Nov 2 22:36:02 EST 2005 * Doc fixes and OrderBy cleanup from ruslan 1.34 Wed Nov 2 22:26:15 EST 2005 * Clone support from Ruslan 0.05_02 * Added support for "virtual" columns * Added support for named references between tables column owner => refers_to MyApp::User by 'email'; * not_null deprecated in favor of mandatory 0.05_01 Tue Nov 8 16:29:02 EST 2005 * Initial release