QOF: qof-backend-gda outline

QOF 0.7.5

Files | Functions
qof-backend-gda outline
Query Object Framework » Backends: Permanent storage for QOF entities.

## Files
file | qof-gda.h
| Public interface of qof-backend-gda.

## Functions
void | qof_gda_provider_init (void)
| Initialises the libgda2 QOF backend. More...

## Detailed Description

This is a prototype only, it is not yet fully functional. This backend is to complement the libxml2 backend and provide full database access for any QOF application without requiring a permanent connection to a real database. A QofBook can be stored in a GDA plugin (mysql, sqlite, postgres or odbc) when available, or XML if not. Data can be queried independently of which backend is in use via QofQuery.

KVP is an anomaly, it may or may not work.

Note that QOF_TYPE_GUID is stored as a string.

## Function Documentation

## ◆ qof_gda_provider_init()

void qof_gda_provider_init | ( | void |  | ) |

Initialises the libgda2 QOF backend.

Sets QOF GDA Backend Version 0.1, access method = gda:

The ID in all GDA tables created by QOF is the GUID of the entity, expressed as a hexadecimal string.

The version number only changes if:

1. QOF_OBJECT_VERSION changes
2. The QofBackendProvider struct is modified in QOF to support new members and SQLite can support the new function, or
3. The QofBackendOption settings are modified.

Initialises the backend and provides access to the functions that will load and save the data. Initialises default values for the QofBackendOption KvpFrame.

At present, qof_gda has no QofBackendOption options and therefore no strings that are translatable.

Definition at line 624 of file qof-gda.c.

625 {
626 QofBackendProvider *prov;
627
628 bindtextdomain (PACKAGE, LOCALE_DIR);
629 prov = g_new0 (QofBackendProvider, 1);
630 prov->provider_name = "QOF GDA Backend Version 0.1";
631 prov->access_method = ACCESS_METHOD;
632 prov->partial_book_supported = TRUE;
633 prov->backend_new = qgda_backend_new;
634 prov->check_data_type = qgda_determine_file_type;
635 prov->provider_free = qgda_provider_free;
636 qof_backend_register_provider (prov);
637 }
qof_backend_register_provider
void qof_backend_register_provider(QofBackendProvider *)
Definition: qofsession.c:59
QofBackendProvider_s
Definition: qofbackend-p.h:238
QofBackendProvider_s::partial_book_supported
gboolean partial_book_supported
Partial QofBook handler.
Definition: qofbackend-p.h:254
QofBackendProvider_s::provider_free
void(* provider_free)(QofBackendProvider *)
Definition: qofbackend-p.h:280
QofBackendProvider_s::backend_new
QofBackend *(* backend_new)(void)
Definition: qofbackend-p.h:260
QofBackendProvider_s::access_method
const gchar * access_method
Definition: qofbackend-p.h:247
QofBackendProvider_s::check_data_type
gboolean(* check_data_type)(const gchar *)
Distinguish two providers with same access method.
Definition: qofbackend-p.h:277
QofBackendProvider_s::provider_name
const gchar * provider_name
Definition: qofbackend-p.h:241