[system] Repository:
ViewVC logotype

Revision 1167


Jump to revision: Previous Next
Author: sh002i
Date: Fri Jun 13 23:35:54 2003 UTC (9 years, 11 months ago)
Log Message:
Several changes to the DB system:

Made all schemas subclasses of WeBWorK::DB::Schema, factored common
constructor code out into Schema.pm. Made all drivers subclasses of
WeBWorK::DB::Schema, factored common constructor code out into
Driver.pm.

Removed superfluous style() and tables() functions from schemas and
drivers. (You can treat the constants in which these are defined as
functions, and call them like $object->STYLE or $object->STYLE().)

WeBWorK::DB now tries to build all tables defined in %dbLayout, instead
of using its own internal list. (TODO: add warnings if known tables are
not built or unknown tables are built.)

Made the error messages given during DB instantiation a little more
intelligent.

Changed the behavior of the exists() and delete() schema methods in all
schemas (and updated the docs) s.t. not all elements of @keyparts have
to be defined.

Changed WeBWorK::DB to allow undefined values to be passed instead of
IDs in delete* method calls, but only if the call was made from
WeBWorK::DB itself (to protect you from accidentally passing an
undefined value and clobbering your whole database).

Changed delete functions to be more efficient. For example,
deleteGlobalSet no longer has to say:

	$self->deleteUserSet($_, $setID)
		foreach $self->listSetUsers($setID);
	$self->deleteGlobalProblem($setID, $_)
		foreach $self->listGlobalProblems($setID);

Instead it says:

	$self->deleteUserSet(undef, $setID);
	$self->deleteGlobalProblem($setID, undef);

This is somewhat more efficient with hash-style schemas, and MUCH more
efficient with the SQL schema.

As usual, be wary of lingering bugs. w00t!
-sam

Changed paths:

Path Details
Directorytrunk/webwork-modperl/lib/WeBWorK/DB/Driver/GDBM.pm modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/DB/Driver/Null.pm modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/DB/Driver/SQL.pm modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/DB/Schema/Auth1Hash.pm modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/DB/Schema/Classlist1Hash.pm modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/DB/Schema/GlobalTableEmulator.pm modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/DB/Schema/Null.pm modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/DB/Schema/SQL.pm modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/DB/Schema/WW1Hash.pm modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/DB/Schema.pm modified , text changed
Directorytrunk/webwork-modperl/lib/WeBWorK/DB.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/DB/Driver/GDBM.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/DB/Driver/Null.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/DB/Driver/SQL.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/DB/Schema/Auth1Hash.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/DB/Schema/Classlist1Hash.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/DB/Schema/GlobalTableEmulator.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/DB/Schema/Null.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/DB/Schema/SQL.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/DB/Schema/WW1Hash.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/DB/Schema.pm modified , text changed
Directorytrunk/webwork2/lib/WeBWorK/DB.pm modified , text changed

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9