![]() |
![]() |
![]() |
Libgnomedb Reference Manual | ![]() |
---|
Data models are a group of data organized in rows and columns. All the data in the same column have the same type, and all the data in each row have the same semantic meaning. Libgnomedb uses the GdaDataModel objects to actually hold the data, but also defines the GnomeDbDataModel interface which adds some common ways of accessing and using the data. This last interface makes it possible to have data models which depend on parameters, or which are represented by the execution's result of a SELECT query.
Specifically, the GnomeDbResultSet object is a data model to store data comming from the result of a SELECT statement, the GnomeDbModelWrapper is a data model to store data which is already in a GdaDataModel (it's a wrapper object).
The GnomeDbDataProxy object has two functions: it provides the GtkTreeModel interface to a GnomeDbDataModel (which makes it easy to display data contents in a GtkTreeView) and acts as a proxy where modifications can be made and the underlying data model be modified only afterwards (of course modifications can also be cancelled).
The GnomeDbDataSet and GnomeDbParameter objects work together. The latter object is designed to hold a value (as a GdaValue) along with some specifications (can the value be NULL?, etc.). The GnomeDbDataSet object holds together a set of GnomeDbParameter objects which, considered together, have a meaning.