[Rt-commit] r4337 - in Jifty-DBI/trunk: . doc/notes lib/Jifty/DBI

alexmv at bestpractical.com alexmv at bestpractical.com
Tue Dec 20 16:45:39 EST 2005


Author: alexmv
Date: Tue Dec 20 16:45:38 2005
New Revision: 4337

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/doc/notes/on_intuitive_schema_definitions
   Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
   Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
Log:
 r7895 at zoq-fot-pik:  chmrr | 2005-12-20 16:44:07 -0500
  * Remove swearwords and JFDI references
  * Load with no parameters doesn't even rty to do anything


Modified: Jifty-DBI/trunk/doc/notes/on_intuitive_schema_definitions
==============================================================================
--- Jifty-DBI/trunk/doc/notes/on_intuitive_schema_definitions	(original)
+++ Jifty-DBI/trunk/doc/notes/on_intuitive_schema_definitions	Tue Dec 20 16:45:38 2005
@@ -21,12 +21,12 @@
 But is the general concept ok?
 
 # maybe. I almost wonder whether we want a separate class for this. 
-JFDI::DBI::Record->import(), actually ;
+Jifty::DBI::Record->import(), actually ;
 
 
 
 # or could be:
-JFDI::DBI::Record->inherit; # or something (that means it has to be loaded already)
+Jifty::DBI::Record->inherit; # or something (that means it has to be loaded already)
 # Well, sure, import would just work.
 # that's just evil.  maybe right too.
 
@@ -36,7 +36,7 @@
 
 then you could have
 
-import JFDI::DBI::Record::SchemaFunctions# or something
+import Jifty::DBI::Record::SchemaFunctions# or something
 
 #not sure I like that, though.
 # would you want to have that *and* the use base though?
@@ -46,7 +46,7 @@
 # if you're not trying to subclass, then I don't see what's wrong
 # with 
 
-use JFDI::DBI::Record ':schemafunctions';
+use Jifty::DBI::Record ':schemafunctions';
 # which is standard Exporter.pm (@EXPORT_TAGS or whatever)
 
 *nod*
@@ -261,8 +261,8 @@
 
 # well, i mean, there's always
 
-use base 'JFDI::DBI::Record'; # set up inheritance
-JFDI::DBI::Record->im_gonna_be_describing sym;
+use base 'Jifty::DBI::Record'; # set up inheritance
+Jifty::DBI::Record->im_gonna_be_describing sym;
 
 # it should not be two statements.
 

Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm	Tue Dec 20 16:45:38 2005
@@ -530,7 +530,7 @@
 
 Returns the record class which this is a collection of; override this
 to subclass.  Or, pass it the name of a class an an argument after
-creating a C<JFDI::Collection> object to create an 'anonymous'
+creating a C<Jifty::DBI::Collection> object to create an 'anonymous'
 collection class.
 
 If you haven't specified a record class, this eturns a best guess at
@@ -648,8 +648,8 @@
     my $self = shift;
     my %args = (
         table            => $self->table,
-        column           => 'fuck',
-        value            => 'hate',
+        column           => undef,
+        value            => undef,
         alias            => undef,
         quote_value      => 1,
         entry_aggregator => 'or',
@@ -662,6 +662,12 @@
 
     my ($Alias);
 
+    # We need to be passed a column and a value, at very least
+    die "Must provide a column to limit"
+      unless defined $args{column};
+    die "Must provide a value to limit to"
+      unless defined $args{value};
+
     #since we're changing the search criteria, we need to redo the search
     $self->redo_search();
 

Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm	Tue Dec 20 16:45:38 2005
@@ -610,6 +610,8 @@
 sub load {
     my $self = shift;
 
+    return unless @_ and defined $_[0];
+
     return $self->load_by_cols( id => shift );
 }
 


More information about the Rt-commit mailing list