NAME
SeeAlso::Source::DBI - returns links stored in an SQL database
new ($dsi, $username, $auth, %attr)
Create a new SeeAlso server with a given database connection.
db_query ( $identifier )
Gets a SeeAlso::Identifier object and returns a SeeAlso::Response object or may throw an error. Do not directly call this but with the method query
!
connected
Return whether the database connection is established.
load_file ( $filename )
Load a local file into the database. Currently only MySQL is supported. The local file must contain on each line identifier, label, description, and uri seperated by tabulator. The local file is not tested to conform to this requirement, you can use the check_load_file method for this. Returns the number of loaded records.
create_table
purge and create table.
check_load_file ( $filename )
Test a local file whether it can be load into the database. Does not test whether the database connection is available but the integrity of the file to be load with the load_file method. Each line must consists of identifier, label, description, and uri seperated by tabulator.
Up to now this method is experimental. Only the existence of four values is checked, empty strings are allowed as well as malformed uris and duplicates.
This metod returns the number of malformed lines, so it returns 0 if the file is valid.
insert ( identifier, label, description, uri )
Inserts a single response content (experimental).