[Jifty-commit] r2619 - Jifty-DBI/branches/od/lib/Jifty/DBI
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Jan 26 22:06:13 EST 2007
Author: audreyt
Date: Fri Jan 26 22:06:13 2007
New Revision: 2619
Modified:
Jifty-DBI/branches/od/lib/Jifty/DBI/Schema.pm
Log:
* Jifty::DBI::Schema - Proper support for since/until
Modified: Jifty-DBI/branches/od/lib/Jifty/DBI/Schema.pm
==============================================================================
--- Jifty-DBI/branches/od/lib/Jifty/DBI/Schema.pm (original)
+++ Jifty-DBI/branches/od/lib/Jifty/DBI/Schema.pm Fri Jan 26 22:06:13 2007
@@ -69,15 +69,23 @@
are => '',
as => '',
ajax => 'ajax_',
- since => sub { since => @_},
- until => sub { until => @_},
refers_to => sub { refers_to => @_ },
refers => sub { refers_to => @_ },
- }
+ },
+ helpers => {
+ render_as => sub ($) { render as @_ },
+ since => sub ($) { since is @_ },
+ 'until' => sub ($) { is->until(@_) },
+ },
);
use Class::Data::Inheritable;
-our @EXPORT = qw( defer lazy column schema by render_as );
+our @EXPORT = qw( defer lazy column schema by render_as since until );
+
+sub by { @_ }
+sub render_as ($) { render as @_ }
+sub since ($) { since is @_ }
+sub until ($) { is->until(@_) }
our $SCHEMA;
our $SORT_ORDERS = {};
@@ -154,11 +162,6 @@
}
-sub by { @_ }
-sub render_as ($) {
- as->render(@_);
-}
-
=head1 FUNCTIONS
All these functions are exported. However, if you use the C<schema> helper function,
More information about the Jifty-commit
mailing list