DataContainer::DBI-class constructor.
It calls the parent new-constructor and then sets some additional parameters for the DataContainert::DBI-class.
The location parameter is here used to mean data_source for the connect method of DBI. The name parameter is here used to mean the table name to load or save data to.
Possible extra parameters for this sub-class is:
user Username to connect to database with. Required.
pw Password to connect to database with. Required.
pwfile Password file to load password from. Optional if not using the pw-option. The option requires the pw-parameter to be blank or not specified.
orderby The field to order the select-statement by when loading the database contents. Optional and can be undef. If defined it sets the field name of the SQL order by-statement. Please remember that whatever is specified here it is added as a field-name to SELECT as well.
Returns an instantiated object.
Open connection to database.
No parameters required.
See documentation of the DataContainer-class for more information on this method.
Returns status if database connection has been opened or not?
See documentation of the DataContainer-class for more information on this method.
Close the database connection.
See documentation of the DataContainer-class for more information on this method.
Load all data from a table in a database into the ContentCollection-instance.
Returns 1 upon success, 0 upon failure.
No parameters required, but one can override the table one reads data from by specifying one scalar parameter here.
See documentation of the DataContainer-class for more information on this method.
Saves all data from the ContentCollection-instance to the database.
Returns 1 upon success, 0 upon failure.
No parameters required, but one can override the table one saves data to by specifying one scalar parameter here.
See documentation of the DataContainer-class for more information on this method.
Delete all entries in the ContentCollection instance from database. See documentation of the DataContainer placeholder class and the new()-method for more information on the ContentCollection.
Returns 1 upon success, 0 upon failure.
No parameters required, but one can override the table one deletes all data from by specifying one scalar parameter here.
See documentation of the DataContainer-class for more information on this method.