Libgnomedb Reference Manual

### Rodrigo Moya

`<rodrigo@gnome-db.org>`

### Vivien Malerba

`<malerba@gnome-db.org>`

Copyright © 2001-2005 The GNOME Foundation

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be found in Appendix 1, GNU Free Documentation License.

Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and those trademarks are made aware to the members of the GNOME Documentation Project, the names have been printed in caps or initial caps.

Abstract

libgnomedb is a data-bound UI library, based on libgda.

Table of Contents

1. Introduction and setup
  Introduction
  Object Hierarchy
  Basic features
    Initialization - Library initialization and main loop
  A small example
    Application presentation and context
    Database structure
      The customers table
      The orders table
      The order_contents table
      The products table
    Coding the application
      Creating the data dictionary
      Definition of the queries
      Code parts: includes and defines
      Code parts: the main() function
      Code parts: the prepare_main_window() function
      Compiling
  Widget Gallery
  Index
2. Data management tools
  Datasources and connection related widgets
    GnomeDbProviderSelector - A combo box style widget to select a provider
    GnomeDbDataSourceSelector - A combo box style widget to select a data source
    GnomeDbLogin - Login widget
    GnomeDbLoginDialog - Login dialog widget
    GnomeDbDsnSpec -
    GnomeDbDsnConfig - A form to enter datasource information
    GnomeDbDsnConfigDruid - a Druid to add a new datasource
    GnomeDbConnectionProperties - Shows the properties of a GdaConnection object
  Data models management
    GnomeDbDataModel - Interface to improve the capabilities of the GdaDataModel interface
    GnomeDbResultSet - Represents the data returned by the execution of a SELECT query as a GnomeDbDataModel
    GnomeDbModelWrapper - Adds the GnomeDbDataModel interface to objects which implement the GdaDataModel interface
    GnomeDbDataProxy - Proxy to hold modifications for any GnomeDbDataModel, and provides the GtkTreeModel interface
    GnomeDbDataSet - Manages a list of GnomeDbParameter objects which contain individual values
    GnomeDbParameter - Represents a GdaValue with various attributes
  Data bound widgets
    GnomeDbCombo - A combo box with data to be displayed as a GdaDataModel
    GnomeDbForm - Form to display and modify data in a GnomeDbDataModel
    GnomeDbGrid - Database grid widget
    GnomeDbFindDialog - A dialog to enter a string to search among a GdaDataModel
    GnomeDbSelector - Individual selection of libgnomedb objects (data types, functions, ...)
    GnomeDbMatrix - Widget to modify the assoctations between two tables
    GnomeDbLayout - Widget rendering a GnomeDbCustomLayout specification
    GnomeDbmsUpdateViewer - Progress bars for the DBMS update process
    GnomeDbBasicForm - A GUI form to present data in a GnomeDbDataSet
    GnomeDbDataWidget - Interface to control data boud widgets
  Advanced widgets
    GnomeDbEditor - A general purpose SQL editor
    GnomeDbTableEditor - A database table editor (Not yet implemented)
    GnomeDbReportEditor - A reports editor (Not yet implemented)
  Data handlers
    GnomeDbDataHandler - Interface which provides data handling capabilities
    GnomeDbHandlerString -
    GnomeDbHandlerBoolean -
    GnomeDbHandlerTime -
    GnomeDbHandlerNumerical -
    GnomeDbHandlerNone - Default handling of unkonwn data types
    GnomeDbHandlerText -
    GnomeDbHandlerCidr - Specific for Postgres's CIDR data type
    GnomeDbHandlerPassmd5 - Used to store password as an MD5 sum of real password
  Individual data entry widgets
    GnomeDbDataEntry - Interface which provides the user with specific widgets to manipulate data
    GnomeDbEntryString -
    GnomeDbEntryBoolean -
    GnomeDbEntryTime -
    GnomeDbEntryNone - Default handling of unknown data types
    GnomeDbEntryCombo - A combo box to choose a value from a GnomeDbDataSet
    GnomeDbEntryCidr - Specific for Postgres's CIDR data type
    GnomeDbEntryPassmd5 - Used to store password as an MD5 sum of real password
  Cell renderers
    GnomeDbDataCellRendererInfo - Cell renderer to display a cell contextual menu
    GnomeDbDataCellRendererTextual - Cell renderer for textual data
    GnomeDbDataCellRendererBoolean - Cell renderer for booleans
    GnomeDbDataCellRendererCombo -
3. Database introspection and queries
  Dictionary and related objects
    GnomeDbDict - GnomeDb dictionary
    GnomeDbServer - Manages the connection to a database server.
    GnomeDbServerDataType - Represents a data type in the DBMS
    GnomeDbServerFunction - Represents a function in the DBMS.
    GnomeDbServerAggregate - Represents an aggregate in the DBMS (like COUNT() or AVG() for example)
  Database structure
    GnomeDbDatabase - Represents a database in the DBMS server
    GnomeDbTable - Represents a table or a view in the database
    GnomeDbTableField - Represents a field in a table or a view in the database
    GnomeDbConstraint - Represents a constraint within a database
  Data manipulation (DML) queries
    General words about queries
      General structure of a query
      Graphical conventions to represent queries
      Query's parameters
      Structural requirements for each type of query
      Direct SQL queries
    GnomeDbQuery - Represents any kind of DML query
    GnomeDbTarget - Represents a target entity within a query.
    Query fields
    GnomeDbJoin - Represents a join between two different entities
    GnomeDbCondition - Represents a condition within a query
4. Graphs
  Graph management objects
    GnomeDbGraph - Data model to keep graphs' layout
    GnomeDbGraphQuery -
    GnomeDbGraphItem - Parts of data model used with the GnomeDbGraph object.
  Drawing widgets
    GnomeDbCanvas - Base class for all the GnomeCanvas derived widgets in libgnomedb.
    GnomeDbCanvasDbRelations - Graphical representation of the relations (foreign key constreints) in the database.
    GnomeDbCanvasQueryStruct -
    GnomeDbCanvasItem - Base class for all the GnomeCanvasItem derived widgets in libgnomedb.
    GnomeDbCanvasEntity - Draws a graphical representation of a GnomeDbEntity object
    GnomeDbCanvasJoin -
    GnomeDbCanvasField - Draws a graphical representation of a GnomeDbField object
    GnomeDbCanvasTip - Draws a "tooltip" text
    GnomeDbCanvasCursor - Represents a small cursor used when a drag and drop operations occurs within the canvas
    GnomeDbCanvasText - Base class for GnomeDbCanvasItem objects rendering a GnomeDbBase's name as a text
5. Miscellaneous
  GnomeDbSqlConsole -
  List of enumerated - Enumerated values
  Error widgets
    GnomeDbErrorDialog - Error dialog widget
    GnomeDbError - Error display widget
  Misc. interfaces
    GnomeDbEntity - Interface to represent a generic entity (for tables, views or queries)
    GnomeDbField - Interface to represent a generic field (for tables's fields, etc).
    GnomeDbXmlStorage - Interface which provides saving and loading using XML structures
    GnomeDbRenderer - Interface to get representations of objects as SQL statements, XML nodes or human readable text
    GnomeDbReferer - Interface to know when on object is completely defined
  Misc. objects and widgets
    Stock icons - icons to reuse
    GnomeDbGrayBar - Nice looking gray bar widget
    GnomeDbRefBase - Used to reference other objects
    GnomeDbCustomLayout - Object to store the model part of custom layouts
    GnomeDbGraphviz - Creates .dot files which can then be processed with GraphViz.
    GnomeDbWrapperField - GnomeDbField interface implementation for the GnomeDbModelWrapper object
  Non instantiable objects and widgets
    GnomeDbBase - The base class for many of the library'objects
    GnomeDbEntryShell - Provides the necessary button to control ths state of a GnomeDbDataEntry
    GnomeDbEntryWrapper - Abstract class that implements the GnomeDbDataEntry interface
1. GNU Free Documentation License
  0. PREAMBLE
  1. APPLICABILITY AND DEFINITIONS
  2. VERBATIM COPYING
  3. COPYING IN QUANTITY
  4. MODIFICATIONS
  5. COMBINING DOCUMENTS
  6. COLLECTIONS OF DOCUMENTS
  7. AGGREGATION WITH INDEPENDENT WORKS
  8. TRANSLATION
  9. TERMINATION
  10. FUTURE REVISIONS OF THIS LICENSE
  Addendum