[Rt-commit] r4121 - in Jifty-DBI/trunk: . lib/Jifty/DBI
jesse at bestpractical.com
jesse at bestpractical.com
Sun Nov 20 17:08:44 EST 2005
Author: jesse
Date: Sun Nov 20 17:08:44 2005
New Revision: 4121
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI/Column.pm
Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm
Jifty-DBI/trunk/lib/Jifty/DBI/SchemaGenerator.pm
Log:
r18996 at truegrounds: jesse | 2005-11-20 17:07:17 -0500
* Added the beginnings of support for "distinct" columns
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Column.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Column.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Column.pm Sun Nov 20 17:08:44 2005
@@ -15,6 +15,7 @@
readable writable
length
mandatory
+ distinct
refers_to by
alias_for_column
since until
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm Sun Nov 20 17:08:44 2005
@@ -2,7 +2,7 @@
use Carp qw/carp/;
use Exporter::Lite;
our @EXPORT
- = qw(column type default validator immutable unreadable length mandatory not_null valid_values label hints render_as since input_filters output_filters is by are on);
+ = qw(column type default validator immutable unreadable length distinct mandatory not_null valid_values label hints render_as since input_filters output_filters is by are on);
our $SCHEMA;
@@ -81,6 +81,10 @@
return ( [ mandatory => 1 ] );
}
+sub distinct () {
+ return ( [ distinct => 1 ] );
+}
+
sub not_null () {
carp "'is not_null' is deprecated in favor of 'is mandatory'";
return ( [ mandatory => 1 ] );
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/SchemaGenerator.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/SchemaGenerator.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/SchemaGenerator.pm Sun Nov 20 17:08:44 2005
@@ -202,6 +202,7 @@
{ name => $column->name,
type => $column->type,
null => $column->mandatory ? 0 : 1,
+ distinct => $column->distinct,
default => $column->default,
}
);
More information about the Rt-commit
mailing list