|
Class SQLSerializableList
|
|
An (almost) enumerable list of serializable objects. All the usual methods
of enumerable objects apply except sort which remains unimplemented (as a
side effect of <=> not being implemented), even min and max has been implemented.
Enumerable
initialize with the class name and a connected dbi. This will make sure
that we hold on to the dbi (which must remain valid for any call to
succeed)
Fetch an object in the given table (same as class name), with key as
primary key.
Fetch each value (with or without index).The each is almost a nop after
implementing each_with_index. The index will
be the primary key of the object in question.
Select the object with the smallest primary key value, min does not
accept a block as min usually do.
This method expects that the database connected to implements the MIN()
function.
Select the object with the largest primary key value, max does not
accept a block as max usually do.
This method expects that the database connected to implements the MAX()
function.