## GnomeDbServer

GnomeDbServer — Manages the connection to a database server.

## Synopsis

                GnomeDbServer;
                GnomeDbServerInfo;
    enum        GnomeDbServerQueryType;
    GType       gnome_db_server_get_type        (void);
    GObject*    gnome_db_server_new             (GnomeDbDict *dict);
    gboolean    gnome_db_server_set_datasource  (GnomeDbServer *srv,
                                                 const gchar *datasource);
    gchar*      gnome_db_server_get_datasource  (GnomeDbServer *srv);
    gboolean    gnome_db_server_set_user_name   (GnomeDbServer *srv,
                                                 const gchar *username);
    gchar*      gnome_db_server_get_user_name   (GnomeDbServer *srv);
    gboolean    gnome_db_server_set_user_password
                                                (GnomeDbServer *srv,
                                                 const gchar *password);
    void        gnome_db_server_reset           (GnomeDbServer *srv);
    GdaConnection* gnome_db_server_get_gda_connection
                                                (GnomeDbServer *srv);
    gboolean    gnome_db_server_open_connect    (GnomeDbServer *srv,
                                                 GError **error);
    gboolean    gnome_db_server_conn_is_opened  (GnomeDbServer *srv);
    void        gnome_db_server_close_connect   (GnomeDbServer *srv);
    void        gnome_db_server_close_connect_no_warn
                                                (GnomeDbServer *srv);
    GnomeDbServerInfo* gnome_db_server_get_server_info
                                                (GnomeDbServer *srv);
    GnomeDbDict* gnome_db_server_get_dict       (GnomeDbServer *srv);
    GnomeDbServerOpMode gnome_db_server_get_sql_op_mode
                                                (GnomeDbServer *srv,
                                                 const gchar *query);
    GdaDataModel* gnome_db_server_do_query_as_data_model
                                                (GnomeDbServer *srv,
                                                 const gchar *query,
                                                 GnomeDbServerQueryType type,
                                                 GError **error);
    gboolean    gnome_db_server_update_dbms_data
                                                (GnomeDbServer *srv,
                                                 GError **error);
    void        gnome_db_server_stop_update_dbms_data
                                                (GnomeDbServer *srv);
    GnomeDbDataHandler* gnome_db_server_get_handler_by_name
                                                (GnomeDbServer *srv,
                                                 const gchar *name);
    GnomeDbDataHandler* gnome_db_server_get_handler_by_type
                                                (GnomeDbServer *srv,
                                                 GnomeDbServerDataType *type);
    GnomeDbDataHandler* gnome_db_server_get_handler_by_gda
                                                (GnomeDbServer *srv,
                                                 GdaValueType gda_type);
    GSList*     gnome_db_server_get_plugin_handlers
                                                (GnomeDbServer *srv);
    GnomeDbUser* gnome_db_server_get_user_by_name
                                                (GnomeDbServer *srv,
                                                 const gchar *username);
    GSList*     gnome_db_server_get_data_types  (GnomeDbServer *srv);
    GnomeDbServerDataType* gnome_db_server_get_data_type_by_name
                                                (GnomeDbServer *srv,
                                                 const gchar *typename);
    GnomeDbServerDataType* gnome_db_server_get_data_type_by_xml_id
                                                (GnomeDbServer *srv,
                                                 const gchar *xml_id);
    gboolean    gnome_db_server_declare_custom_data_type
                                                (GnomeDbServer *srv,
                                                 GnomeDbServerDataType *type);
    GSList*     gnome_db_server_get_functions   (GnomeDbServer *srv);
    GSList*     gnome_db_server_get_functions_by_name
                                                (GnomeDbServer *srv,
                                                 const gchar *funcname);
    GnomeDbServerFunction* gnome_db_server_get_function_by_name_arg
                                                (GnomeDbServer *srv,
                                                 const gchar *funcname,
                                                 const GSList *argtypes);
    GnomeDbServerFunction* gnome_db_server_get_function_by_dbms_id
                                                (GnomeDbServer *srv,
                                                 const gchar *dbms_id);
    GnomeDbServerFunction* gnome_db_server_get_function_by_xml_id
                                                (GnomeDbServer *srv,
                                                 const gchar *xml_id);
    GSList*     gnome_db_server_get_aggregates  (GnomeDbServer *srv);
    GSList*     gnome_db_server_get_aggregates_by_name
                                                (GnomeDbServer *srv,
                                                 const gchar *aggname);
    GnomeDbServerAggregate* gnome_db_server_get_aggregate_by_name_arg
                                                (GnomeDbServer *srv,
                                                 const gchar *aggname,
                                                 GnomeDbServerDataType *argtype);
    GnomeDbServerAggregate* gnome_db_server_get_aggregate_by_dbms_id
                                                (GnomeDbServer *srv,
                                                 const gchar *dbms_id);
    GnomeDbServerAggregate* gnome_db_server_get_aggregate_by_xml_id
                                                (GnomeDbServer *srv,
                                                 const gchar *xml_id);
    GnomeDbDataHandler* gnome_db_server_get_object_handler
                                                (GnomeDbServer *srv,
                                                 GObject *object);
    void        gnome_db_server_set_object_handler
                                                (GnomeDbServer *srv,
                                                 GObject *object,
                                                 GnomeDbDataHandler *handler);
    void        gnome_db_server_unset_object_handler
                                                (GnomeDbServer *srv,
                                                 GObject *object);
    gboolean    gnome_db_server_object_has_handler
                                                (GnomeDbServer *srv,
                                                 GObject *object);
    void        gnome_db_server_set_object_func_handler
                                                (GnomeDbServer *srv,
                                                 GnomeDbDataHandler* (*func) (GnomeDbServer *, GObject *));
    gchar*      gnome_db_server_escape_chars    (GnomeDbServer *srv,
                                                 const gchar *string);
    GdaDataModel* gnome_db_server_get_gda_schema
                                                (GnomeDbServer *srv,
                                                 GdaConnectionSchema schema,
                                                 GdaParameterList *params);
    void        gnome_db_server_dump            (GnomeDbServer *srv,
                                                 gint offset);

## Object Hierarchy

      GObject
       +----GdaClient
             +----GnomeDbServer

## Implemented Interfaces

GnomeDbServer implements GnomeDbXmlStorage.

## Properties

      "with-functions"       gboolean              : Read / Write

## Signals

    "conn-closed"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer user_data);
    "conn-opened"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer user_data);
    "conn-to-close"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer user_data);
    "data-aggregate-added"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);
    "data-aggregate-removed"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);
    "data-aggregate-updated"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);
    "data-function-added"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);
    "data-function-removed"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);
    "data-function-updated"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);
    "data-type-added"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);
    "data-type-removed"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);
    "data-type-updated"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);
    "data-update-finished"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer user_data);
    "data-update-started"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer user_data);
    "object-handler-updated"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer user_data);
    "update-progress"
                void        user_function      (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                guint arg2,
                                                guint arg3,
                                                gpointer user_data);

## Description

This object is the "access point" to the DBMS. It manages lists of the DBMS's attributes (such as the available data types, function, ...) and is responsible for opening and closing the connection to the DBMS. Also any query sent to the DBMS is done through this object.

This object is also responsible for the conversion of data types (data types defined within the database and data types known to the Libgda library), and for providing the GnomeDbDataHandler objects to manipulate data of each data type.

## Details

### GnomeDbServer

    typedef struct _GnomeDbServer GnomeDbServer;

### GnomeDbServerInfo

    typedef struct {
    	gchar         *provider_name; /* equal to the return of gda_connection_get_provider() */

    	/*
    	 * TRUE if all comparisons of names can be done on the lower case versions of the objects names
    	 */
    	gboolean       is_case_insensitive;

    	/*
    	 * TRUE to suppose that there are implicit casts available for data types which have
    	 * the same gda type
    	 */
    	gboolean       implicit_data_types_casts;

    	/*
    	 * Used when looking for a data type from a SQL expression representing a value
    	 */
    	gint           value_nb_tests_types;
    	gchar        **value_test_data_types; /* array of 'value_nb_tests_types' strings */
    	GdaValueType  *value_test_gda_types;  /* array of 'value_nb_tests_types' GdaValueType */
    } GnomeDbServerInfo;

### enum GnomeDbServerQueryType

    typedef enum {
    	GNOME_DB_SERVER_QUERY_SQL,
    	GNOME_DB_SERVER_QUERY_XML
    } GnomeDbServerQueryType;

### gnome_db_server_get_type ()

    GType       gnome_db_server_get_type        (void);

Returns : |

### gnome_db_server_new ()

    GObject*    gnome_db_server_new             (GnomeDbDict *dict);

Creates a new GnomeDbServer object

`dict` : | a GnomeDbDict object
Returns : | the new object

### gnome_db_server_set_datasource ()

    gboolean    gnome_db_server_set_datasource  (GnomeDbServer *srv,
                                                 const gchar *datasource);

Sets the data source of the server. If the connection is already opened, then no action is performed at all and FALSE is returned.

If the requested datasource does not exist, then nothing is done ans FALSE is returned.

If the default XML filename to save the dictionary has not yet been specified, then the default one is specified, so it is possible to call `gnome_db_dict_load_xml()` right after that.

`srv` : | a GnomeDbServer object
`datasource` : | a gda datasource
Returns : | TRUE on success

### gnome_db_server_get_datasource ()

    gchar*      gnome_db_server_get_datasource  (GnomeDbServer *srv);

Get the data source of the server.

`srv` : | a GnomeDbServer object
Returns : | a new string with the datasource, or NULL

### gnome_db_server_set_user_name ()

    gboolean    gnome_db_server_set_user_name   (GnomeDbServer *srv,
                                                 const gchar *username);

Sets the user name for the connection to the server. If the connection is already opened, then no action is performed at all and FALSE is returned.

`srv` : | a GnomeDbServer object
`username` : |
Returns : | TRUE on success

### gnome_db_server_get_user_name ()

    gchar*      gnome_db_server_get_user_name   (GnomeDbServer *srv);

Get the user name for the connection to the server.

`srv` : | a GnomeDbServer object
Returns : | a new string with the user name, or NULL

### gnome_db_server_set_user_password ()

    gboolean    gnome_db_server_set_user_password
                                                (GnomeDbServer *srv,
                                                 const gchar *password);

Sets the user password for the connection to the server. If the connection is already opened, then no action is performed at all and FALSE is returned.

`srv` : | a GnomeDbServer object
`password` : |
Returns : | TRUE on success

### gnome_db_server_reset ()

    void        gnome_db_server_reset           (GnomeDbServer *srv);

Reset the GnomeDbServer as it was when created; that is: close the connection if opened, and get rid of any data type, function and aggregate it has.

`srv` : | a GnomeDbServer object

### gnome_db_server_get_gda_connection ()

    GdaConnection* gnome_db_server_get_gda_connection
                                                (GnomeDbServer *srv);

Get the GdaConnection object used by `srv`, if the connection is opened.

`srv` : | a GnomeDbServer object
Returns : | the GdaConnection, or `NULL`

### gnome_db_server_open_connect ()

    gboolean    gnome_db_server_open_connect    (GnomeDbServer *srv,
                                                 GError **error);

Opens the connection to the DBMS.

`srv` : | a GnomeDbServer object
`error` : | location to store error, or `NULL`
Returns : | TRUE if success and FALSE otherwise (and error is positionned)

### gnome_db_server_conn_is_opened ()

    gboolean    gnome_db_server_conn_is_opened  (GnomeDbServer *srv);

Checks wether the connection to the DBMS is opened or not

`srv` : | a GnomeDbServer object
Returns : | TRUE if the connection is opened

### gnome_db_server_close_connect ()

    void        gnome_db_server_close_connect   (GnomeDbServer *srv);

Closes the connection to the DBMS. First the "conn_to_close" signal is emitted. This function should preferably be called instead of the `gnome_db_server_close_connect_no_warn()` function.

`srv` : | a GnomeDbServer object

### gnome_db_server_close_connect_no_warn ()

    void        gnome_db_server_close_connect_no_warn
                                                (GnomeDbServer *srv);

Closes the connection to the DBMS. Warning: "conn_to_close" signal is NOT emitted.

`srv` : | a GnomeDbServer object

### gnome_db_server_get_server_info ()

    GnomeDbServerInfo* gnome_db_server_get_server_info
                                                (GnomeDbServer *srv);

Fetch the GnomeDbServerInfo structure describing `srv`'s features Do not free that structure!

`srv` : | a GnomeDbServer object
Returns : | a GnomeDbServerInfo structure, or `NULL` if none exists

### gnome_db_server_get_dict ()

    GnomeDbDict* gnome_db_server_get_dict       (GnomeDbServer *srv);

Fetch the GnomeDbDict object to which the GnomeDbServer belongs.

`srv` : | a GnomeDbServer object
Returns : | the GnomeDbDict object

### gnome_db_server_get_sql_op_mode ()

    GnomeDbServerOpMode gnome_db_server_get_sql_op_mode
                                                (GnomeDbServer *srv,
                                                 const gchar *query);

Get the operation type (= mode) which is performed by the query given as argument. The query MUST contain only one statement, not several separated by ';'

`srv` : | a GnomeDbServer object
`query` : | an SQL query
Returns : | the query type (mode).

### gnome_db_server_do_query_as_data_model ()

    GdaDataModel* gnome_db_server_do_query_as_data_model
                                                (GnomeDbServer *srv,
                                                 const gchar *query,
                                                 GnomeDbServerQueryType type,
                                                 GError **error);

Sends a query to the DBMS to which the connection is established. If the query is a SELECT one, then a new GdaDataModel is returned (it's up to the caller to unref that object); otherwise NULL is returned. The error variable contains the error code if an error occurred.

`srv` : | a GnomeDbServer object
`query` : | the query to be executed
`type` : | the query type (SQL or XML)
`error` : | location to store error, or `NULL`
Returns : | a new GdaDataModel object or NULL

### gnome_db_server_update_dbms_data ()

    gboolean    gnome_db_server_update_dbms_data
                                                (GnomeDbServer *srv,
                                                 GError **error);

Synchronise the list of data types, functions, etc the GnomeDbServer object has with what is in the DBMS the connection is opened to. The connection to the DBMS MUST be opened.

`srv` : | a GnomeDbServer object
`error` : | location to store error, or `NULL`
Returns : | TRUE if no error

### gnome_db_server_stop_update_dbms_data ()

    void        gnome_db_server_stop_update_dbms_data
                                                (GnomeDbServer *srv);

When the server updates its internal lists of DBMS objects, a call to this function will stop that update process. It has no effect when the server is not updating its DBMS data.

`srv` : | a GnomeDbServer object

### gnome_db_server_get_handler_by_name ()

    GnomeDbDataHandler* gnome_db_server_get_handler_by_name
                                                (GnomeDbServer *srv,
                                                 const gchar *name);

Get the GnomeDbDataHandler from its name.

`srv` : | a GnomeDbServer object
`name` : |
Returns : | the GnomeDbDataHandler object

### gnome_db_server_get_handler_by_type ()

    GnomeDbDataHandler* gnome_db_server_get_handler_by_type
                                                (GnomeDbServer *srv,
                                                 GnomeDbServerDataType *type);

Get the GnomeDbDataHandler for a data type

`srv` : | a GnomeDbServer object
`type` : |
Returns : | the GnomeDbDataHandler object

### gnome_db_server_get_handler_by_gda ()

    GnomeDbDataHandler* gnome_db_server_get_handler_by_gda
                                                (GnomeDbServer *srv,
                                                 GdaValueType gda_type);

Get the GnomeDbDataHandler for a gda type: the first DataHandler which can handle the requested type is returned. If no good handler can be found, then a default one will be provided. This function never returns NULL.

`srv` : | a GnomeDbServer object
`gda_type` : |
Returns : | the GnomeDbDataHandler object

### gnome_db_server_get_plugin_handlers ()

    GSList*     gnome_db_server_get_plugin_handlers
                                                (GnomeDbServer *srv);

Get a list of all the GnomeDbDataHandler plugins used by the GnomeDbServer.

`srv` : | a GnomeDbServer object
Returns : | an allocated list of plugins

### gnome_db_server_get_user_by_name ()

    GnomeDbUser* gnome_db_server_get_user_by_name
                                                (GnomeDbServer *srv,
                                                 const gchar *username);

Find a GnomeDbUser from its name.

`srv` : | a GnomeDbServer object
`username` : |
Returns : | a pointer to the requested object, or NULL if the object cannot be found.

### gnome_db_server_get_data_types ()

    GSList*     gnome_db_server_get_data_types  (GnomeDbServer *srv);

Get the list of data types;

`srv` : | a GnomeDbServer object
Returns : | the list (the caller must free the list after usage)

### gnome_db_server_get_data_type_by_name ()

    GnomeDbServerDataType* gnome_db_server_get_data_type_by_name
                                                (GnomeDbServer *srv,
                                                 const gchar *typename);

Find a data type from its DBMS name or from one of its synonyms if it has some.

`srv` : | a GnomeDbServer object
`typename` : | the name of the requested data type
Returns : | the data type or `NULL` if it cannot be found

### gnome_db_server_get_data_type_by_xml_id ()

    GnomeDbServerDataType* gnome_db_server_get_data_type_by_xml_id
                                                (GnomeDbServer *srv,
                                                 const gchar *xml_id);

To find a GnomeDbServerDataType using its XML id.

`srv` : | a GnomeDbServer object
`xml_id` : | the XML identifier of the data type to be found
Returns : | the data type or `NULL` if it cannot be found

### gnome_db_server_declare_custom_data_type ()

    gboolean    gnome_db_server_declare_custom_data_type
                                                (GnomeDbServer *srv,
                                                 GnomeDbServerDataType *type);

Forces `srv` to consider `type` as a new data type even though that data type is not declared by the database to which `srv` can be connected to.

`srv` : | a GnomeDbServer object
`type` : | a GnomeDbServerDataType object
Returns : | TRUE if the data type does not already exist, and FALSE if it does.

### gnome_db_server_get_functions ()

    GSList*     gnome_db_server_get_functions   (GnomeDbServer *srv);

To get the complete list of functions

`srv` : | a GnomeDbServer object
Returns : | the allocated list of functions

### gnome_db_server_get_functions_by_name ()

    GSList*     gnome_db_server_get_functions_by_name
                                                (GnomeDbServer *srv,
                                                 const gchar *funcname);

To get the list of DBMS functions which match the given name.

`srv` : | a GnomeDbServer object
`funcname` : | name of the function
Returns : | the allocated list of functions

### gnome_db_server_get_function_by_name_arg ()

    GnomeDbServerFunction* gnome_db_server_get_function_by_name_arg
                                                (GnomeDbServer *srv,
                                                 const gchar *funcname,
                                                 const GSList *argtypes);

To find a DBMS function which is uniquely identified by its name and the type(s) of its argument(s).

About the functions accepting any data type for one of their argument: if the corresponding data type in `argtypes` is not `NULL`, then such a function will be a candidate, and if the corresponding data type in `argtypes` is `NULL`, then only such a function will be a candidate.

`srv` : | a GnomeDbServer object
`funcname` : | name of the function
`argtypes` : | a list of GnomeDbServerDataType objects
Returns : | The function or NULL if not found

### gnome_db_server_get_function_by_dbms_id ()

    GnomeDbServerFunction* gnome_db_server_get_function_by_dbms_id
                                                (GnomeDbServer *srv,
                                                 const gchar *dbms_id);

To find a DBMS functions which is uniquely identified by its DBMS identifier

`srv` : | a GnomeDbServer object
`dbms_id` : |
Returns : | The function or NULL if not found

### gnome_db_server_get_function_by_xml_id ()

    GnomeDbServerFunction* gnome_db_server_get_function_by_xml_id
                                                (GnomeDbServer *srv,
                                                 const gchar *xml_id);

To find a DBMS functions which is uniquely identified by its XML identifier

`srv` : | a GnomeDbServer object
`xml_id` : |
Returns : | The function or NULL if not found

### gnome_db_server_get_aggregates ()

    GSList*     gnome_db_server_get_aggregates  (GnomeDbServer *srv);

To get the complete list of aggregates

`srv` : | a GnomeDbServer object
Returns : | the allocated list of aggregates

### gnome_db_server_get_aggregates_by_name ()

    GSList*     gnome_db_server_get_aggregates_by_name
                                                (GnomeDbServer *srv,
                                                 const gchar *aggname);

To get the list of DBMS aggregates which match the given name.

`srv` : | a GnomeDbServer object
`aggname` : | the name of the aggregate
Returns : | the allocated list of aggregates

### gnome_db_server_get_aggregate_by_name_arg ()

    GnomeDbServerAggregate* gnome_db_server_get_aggregate_by_name_arg
                                                (GnomeDbServer *srv,
                                                 const gchar *aggname,
                                                 GnomeDbServerDataType *argtype);

To find a DBMS aggregate which is uniquely identified by its name and the type of its argument.

About the aggregates accepting any data type for their argument: if `argtype` is not `NULL` then such an aggregate will be a candidate, and if `argtype` is `NULL` then only such an aggregate will be a candidate.

If several aggregates are found, then the aggregate completely matching will be returned, or an aggregate where the argument type has the same GDA typa as the `argtype`, or lastly an aggregate accepting any data type as argument.

`srv` : | a GnomeDbServer object
`aggname` : | the name of the aggregate
`argtype` : | the type of argument or `NULL`
Returns : | The aggregate or NULL if not found

### gnome_db_server_get_aggregate_by_dbms_id ()

    GnomeDbServerAggregate* gnome_db_server_get_aggregate_by_dbms_id
                                                (GnomeDbServer *srv,
                                                 const gchar *dbms_id);

To find a DBMS functions which is uniquely identified by its name and the type of its argument.

`srv` : | a GnomeDbServer object
`dbms_id` : |
Returns : | The aggregate or NULL if not found

### gnome_db_server_get_aggregate_by_xml_id ()

    GnomeDbServerAggregate* gnome_db_server_get_aggregate_by_xml_id
                                                (GnomeDbServer *srv,
                                                 const gchar *xml_id);

To find a DBMS aggregates which is uniquely identified by its XML identifier

`srv` : | a GnomeDbServer object
`xml_id` : |
Returns : | The aggregate or NULL if not found

### gnome_db_server_get_object_handler ()

    GnomeDbDataHandler* gnome_db_server_get_object_handler
                                                (GnomeDbServer *srv,
                                                 GObject *object);

Get the right GnomeDbDataHandler object reference to manage data which is "linked" to the object. The object will usually be a GnomeDbServerDataType, a GnomeDbServerFunction, or a GnomeDbServerAggregate.

The returned GnomeDbDataHandler depends on the loaded plugins and on the user preferences regarding how these plugins are to be used. If the user has not set any preference for the object, then some default rules are used: <ul> <li> for GnomeDbServerDataType, the GnomeDbDataHandler corresponding to the gda type of the GnomeDbServerDataType is returned</li></ul> -> for GnomeDbServerFunction, the GnomeDbDataHandler corresponding to the GnomeDbServerDataType returned by the function is returned -> ...

`srv` : | a GnomeDbServer object
`object` : | a GObject object
Returns : | the GnomeDbDataHandler associated to the given object, NEVER returns NULL.

### gnome_db_server_set_object_handler ()

    void        gnome_db_server_set_object_handler
                                                (GnomeDbServer *srv,
                                                 GObject *object,
                                                 GnomeDbDataHandler *handler);

This function is the opposite of the `gnome_db_server_get_object_handler()` function: it "attaches" a GnomeDbDataHandler object to any given object, and a subsequent call to gnome_db_server_get_object_handler(object) will return the GnomeDbDataHandler object.

`srv` : | a GnomeDbServer object
`object` : | a GObject
`handler` : |

### gnome_db_server_unset_object_handler ()

    void        gnome_db_server_unset_object_handler
                                                (GnomeDbServer *srv,
                                                 GObject *object);

Shortcut to `gnome_db_server_set_object_handler()` with NULL as "handler" argument.

`srv` : | a GnomeDbServer object
`object` : | a GObject

### gnome_db_server_object_has_handler ()

    gboolean    gnome_db_server_object_has_handler
                                                (GnomeDbServer *srv,
                                                 GObject *object);

Tells if a GnomeDbDataHandler object has been assigned to the object given as argument, or if the GnomeDbDataHandler which would be returned by the `gnome_db_server_get_object_handler()` function is a default one.

`srv` : | a GnomeDbServer object
`object` : | a GObject
Returns : | TRUE if a GnomeDbDataHandler object has been assigned to the object.

### gnome_db_server_set_object_func_handler ()

    void        gnome_db_server_set_object_func_handler
                                                (GnomeDbServer *srv,
                                                 GnomeDbDataHandler* (*func) (GnomeDbServer *, GObject *));

This function provides a way for the GnomeDbServer function to apply rules to find an appropriate GnomeDbDataHandler for an object.

`srv` : | a GnomeDbServer object
`func` : | a function

### gnome_db_server_escape_chars ()

    gchar*      gnome_db_server_escape_chars    (GnomeDbServer *srv,
                                                 const gchar *string);

Escapes the special caracters from a string. The new string can then safely be sent to the DBMS.

`srv` : | a GnomeDbServer object
`string` : |
Returns : | the escaped string

### gnome_db_server_get_gda_schema ()

    GdaDataModel* gnome_db_server_get_gda_schema
                                                (GnomeDbServer *srv,
                                                 GdaConnectionSchema schema,
                                                 GdaParameterList *params);

Get a direct access to the libgda's function call to get a DBMS schema. It should not directely be used since libgnomedb hides any necessary call to it.

`srv` : | a GnomeDbServer object
`schema` : | the requested schema
`params` : | some parameters for the requested schema, or NULL
Returns : | the data model, or NULL if an error occurred

### gnome_db_server_dump ()

    void        gnome_db_server_dump            (GnomeDbServer *srv,
                                                 gint offset);

Writes a textual description of the object to STDOUT. This function only exists if libgnomedb is compiled with the "--enable-debug" option.

`srv` : | a GnomeDbServer object
`offset` : | the offset (in caracters) at which the dump will start

## Property Details

### The "`with-functions`" property

      "with-functions"       gboolean              : Read / Write

Default value: FALSE

## Signal Details

### The "conn-closed" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "conn-opened" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "conn-to-close" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "data-aggregate-added" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "data-aggregate-removed" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "data-aggregate-updated" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "data-function-added" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "data-function-removed" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "data-function-updated" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "data-type-added" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "data-type-removed" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "data-type-updated" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "data-update-finished" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "data-update-started" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "object-handler-updated" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "update-progress" signal

    void        user_function                  (GnomeDbServer *dbserver,
                                                gpointer arg1,
                                                guint arg2,
                                                guint arg3,
                                                gpointer user_data);

`dbserver` : | the object which received the signal.
`arg1` : |
`arg2` : |
`arg3` : |
`user_data` : | user data set when the signal handler was connected.