#include <ODBCMetadataPlugin.h>
Inheritance diagram for ODBCMetadataPlugin:
Public Methods | |
bool | init () |
CoreError | create (NumID &docid, const Document &document) |
CoreError | remove (NumID docid) |
CoreError | update (NumID docid, const Document &document) |
CoreError | get (NumID docid, Document &document) |
CoreError | lock (NumID docid, DocumentLock lock) |
CoreError | getLocks (map< NumID, DocumentLock > &locks) |
CoreError | query (NumID first, int maxlen, map< NumID, NumID > &updates) |
To use an ODBC source create an odbc.ini file in your home directory. A sample odbc.ini can be found in the /doc directory. You should copy the file to "~/.odbc.ini".
Provided with the unixodbc package for debian is a qt program that helps you create an odbc.ini.
CREATE statement for use with a Postgresql server:
CREATE SEQUENCE documents_docid_seq;
CREATE SEQUENCE documents_updid_seq;
CREATE TABLE documents (
docid BIGINT DEFAULT nextval('documents_docid_seq') UNIQUE NOT NULL,
updid BIGINT DEFAULT nextval('documents_updid_seq') UNIQUE NOT NULL,
lock CHAR DEFAULT 0,
metadata TEXT NOT NULL
);
This class is multi-thread enabled.
|
Create a document.
Implements MetadataPlugin. |
|
Get a document
Implements MetadataPlugin. |
|
Get the active locks. Useful for cleaning up after a crash.
Implements MetadataPlugin. |
|
Sets up a connection with an ODBC datasource specified in config.
Implements Plugin. |
|
Lock the document.
Implements MetadataPlugin. |
|
Query document changes since 'first'.
Implements MetadataPlugin. |
|
Remove a document.
Implements MetadataPlugin. |
|
Update a document
Implements MetadataPlugin. |