## GdaDataModelBdb GdaDataModelBdb — GdaDataModel to access Berkeley DB database contents |

## Synopsis

                        GdaDataModelBdb;
                        GdaDataModelBdbClass;
                        GdaDataModelBdbPrivate;
    GdaDataModel*       gda_data_model_bdb_new              (const gchar *filename,
                                                             const gchar *db_name);
    GSList*             gda_data_model_bdb_get_errors       (GdaDataModelBdb *model);
    void                gda_data_model_bdb_clean_errors     (GdaDataModelBdb *model);

## Object Hierarchy

      GObject
       +----GdaObject
             +----GdaDataModelBdb

## Implemented Interfaces

GdaDataModelBdb implements GdaDataModel.

## Properties

      "db-name"                  gchar*                : Read / Write / Construct Only
      "filename"                 gchar*                : Read / Write / Construct Only

## Description

The GdaDataModelBdb object allows to access the contents of a Berkeley DB database as a GdaDataModel object.

By default the resulting GdaDataModel contains only two columns (named "key" and "data") of type GDA_TYPE_BINARY, but this object can be subclassed to convert the key or data part of a BDB record into several columns (implement the `create_key_columns()`, `create_data_columns()`, `get_key_part()`, and `get_data_part()` virtual methods).

## Details

### GdaDataModelBdb

    typedef struct _GdaDataModelBdb GdaDataModelBdb;

### GdaDataModelBdbClass

    typedef struct {
    	GdaObjectClass          parent_class;

    	/* virtual methods */
    	GSList                *(*create_key_columns)  (GdaDataModelBdb *model);
    	GSList                *(*create_data_columns) (GdaDataModelBdb *model);
    	GValue                *(*get_key_part)        (GdaDataModelBdb *model,
    						       gpointer data, gint length, gint part);
    	GValue                *(*get_data_part)       (GdaDataModelBdb *model,
    						       gpointer data, gint length, gint part);
    	gboolean               (*update_key_part)     (GdaDataModelBdb *model,
    						       gpointer data, gint length, gint part,
    						       const GValue *value, GError **error);
    	gboolean               (*update_data_part)    (GdaDataModelBdb *model,
    						       gpointer data, gint length, gint part,
    						       const GValue *value, GError **error);
    } GdaDataModelBdbClass;

### GdaDataModelBdbPrivate

    typedef struct _GdaDataModelBdbPrivate GdaDataModelBdbPrivate;

### gda_data_model_bdb_new ()

    GdaDataModel*       gda_data_model_bdb_new              (const gchar *filename,
                                                             const gchar *db_name);

Creates a new GdaDataModel object to access the contents of the Berkeley DB file `file`, for the database `db_name` if not `NULL`

`filename` : |
`db_name` : | the name of the database within `filename`, or `NULL`
Returns : | a new GdaDataModel

### gda_data_model_bdb_get_errors ()

    GSList*             gda_data_model_bdb_get_errors       (GdaDataModelBdb *model);

`model` : |
Returns : |

### gda_data_model_bdb_clean_errors ()

    void                gda_data_model_bdb_clean_errors     (GdaDataModelBdb *model);

`model` : |

## Property Details

### The `"db-name"` property

      "db-name"                  gchar*                : Read / Write / Construct Only

Default value: NULL

### The `"filename"` property

      "filename"                 gchar*                : Read / Write / Construct Only

Default value: NULL