Inheritance diagram for BigSWAF::DBCapsulator:

Public Class Methods | |
| DBCapsulator | database (scalar db) |
| Opens a connection to the given database. | |
| connect (hashref dbcfg) | |
| Connect to a database using the given database connection. | |
Public Object Methods | |
| hashref | dbcfg (hashref dbcfg) |
| Get/set the configuration of the current database connection. | |
| int | search (BigSWAF::DBCapsulator::SearchFilter filter) |
| Search the database/relation for records matching the given filter. | |
| hashref | getnext () |
| Get the next result record of a previous search(). | |
| int | add (hashref record) |
| Add a record to the database/relation. | |
| delete (hashref record) | |
| Remove a record from the database/relation. | |
| update (hashref record) | |
| Update a record in the database/relation. | |
| retval | close () |
| Closes the database connection. | |
| hash | getnext_locallysorted (SearchFilter filter) |
| Returns the next record from a search. | |
| void | clear_sortcache (scalar size) |
| Clears and setup the cache used by getnext_locallysorted(). | |
| retval | schema (scalar name) |
Public Functions | |
| retval | config (scalar cfg) |
| Read a config file defining the data connections. | |
| retval | schemadir (scalar dir) |
| Set the directory where DBCapsulator will find meta information for the tables. | |
| retval | error (scalar msg) |
| Prints an error message. | |
Classes | |
| class | DBI |
| class | DBI_CSV |
| class | Null |
| class | SearchFilter |
| Search Filter encapsulation. More... | |
|
|
Add a record to the database/relation.
|
|
|
Clears and setup the cache used by getnext_locallysorted(). It is good style to clear the cache before you first use getnext_locallysorted() on a started search.
|
|
|
Closes the database connection.
Reimplemented in BigSWAF::DBCapsulator::DBI, and BigSWAF::DBCapsulator::Null. |
|
|
Read a config file defining the data connections.
|
|
|
Connect to a database using the given database connection. This method is usually called by database() with the information found in the config file. Sub classes usually will want to override this method and implement their own connection method.
|
|
|
Opens a connection to the given database. database() will search the config file set via config() for the named database, and set up an appropriate database connection.
|
|
|
Get/set the configuration of the current database connection.
|
|
|
Remove a record from the database/relation.
|
|
|
Prints an error message.
|
|
|
Get the next result record of a previous search(). The record is a hash with the keys being field names and values being the field values.
Reimplemented in BigSWAF::DBCapsulator::DBI, and BigSWAF::DBCapsulator::Null. |
|
|
Returns the next record from a search. However, records are first read into a local cache of the given size, then sorted within this cache and retrieved only after that. Records that are out of order after this local sort are silently dropped.
|
|
|
|
|
|
Set the directory where DBCapsulator will find meta information for the tables.
|
|
|
Search the database/relation for records matching the given filter. The results can be retrieved using getnext(). Each connection therefore only accepts one search at a time. Setting up a new search via search() implies that the old search is lost.
|
|
|
Update a record in the database/relation.
|
1.4.5