GnomeDbServerFunction

GnomeDbServerFunction — Represents a function in the DBMS.

Synopsis




            GnomeDbServerFunction;
            GnomeDbServerFunctionPrivate;
GType       gnome_db_server_function_get_type
                                            (void);
GObject*    gnome_db_server_function_new    (GnomeDbServer *srv);
void        gnome_db_server_function_set_dbms_id
                                            (GnomeDbServerFunction *func,
                                             const gchar *id);
gchar*      gnome_db_server_function_get_dbms_id
                                            (GnomeDbServerFunction *func);
void        gnome_db_server_function_set_sqlname
                                            (GnomeDbServerFunction *func,
                                             const gchar *sqlname);
const gchar* gnome_db_server_function_get_sqlname
                                            (GnomeDbServerFunction *func);
void        gnome_db_server_function_set_arg_types
                                            (GnomeDbServerFunction *func,
                                             const GSList *arg_types);
const GSList* gnome_db_server_function_get_arg_types
                                            (GnomeDbServerFunction *func);
void        gnome_db_server_function_set_ret_type
                                            (GnomeDbServerFunction *func,
                                             GnomeDbServerDataType *dt);
GnomeDbServerDataType* gnome_db_server_function_get_ret_type
                                            (GnomeDbServerFunction *func);
gboolean    gnome_db_server_function_accepts_args
                                            (GnomeDbServerFunction *func,
                                             const GSList *arg_types);

Object Hierarchy


  GObject
   +----GnomeDbBase
         +----GnomeDbServerFunction

Implemented Interfaces

GnomeDbServerFunction implements GnomeDbXmlStorage.

Properties


  "prop"                 gpointer              : Read / Write

Signals


"templ-signal"
            void        user_function      (GnomeDbServerFunction *dbserverfunction,
                                            gpointer               user_data)             : Run first

Description

The GnomeDbServerFunction represents a function, it has zero or more input parameters, and one and only one return type. In this way it does not represent procedures which does not return any data type. Also the argument types are always of the IN kind (no OUT or IN OUT kinds); there may one day be a specific object for procedures. It does not either represent a function returning a SET OF a given data type; there may on day be a specific object for such functions.

Because functions can be polymorphic, the name is not enough to identify them, so the DBMS provides a unique id which can be used to uniquely identify a function.

It implements the GnomeDbXmlStorage interface.

Details

GnomeDbServerFunction

typedef struct _GnomeDbServerFunction GnomeDbServerFunction;


GnomeDbServerFunctionPrivate

typedef struct _GnomeDbServerFunctionPrivate GnomeDbServerFunctionPrivate;


gnome_db_server_function_get_type ()

GType       gnome_db_server_function_get_type
                                            (void);

Returns :

gnome_db_server_function_new ()

GObject*    gnome_db_server_function_new    (GnomeDbServer *srv);

Creates a new GnomeDbServerFunction object

srv : a GnomeDbServer object
Returns : the new object

gnome_db_server_function_set_dbms_id ()

void        gnome_db_server_function_set_dbms_id
                                            (GnomeDbServerFunction *func,
                                             const gchar *id);

Set the DBMS identifier of the function

func : a GnomeDbServerFunction object
id : the DBMS identifier

gnome_db_server_function_get_dbms_id ()

gchar*      gnome_db_server_function_get_dbms_id
                                            (GnomeDbServerFunction *func);

Get the DBMS identifier of the function

func : a GnomeDbServerFunction object
Returns : a new string with the function's id

gnome_db_server_function_set_sqlname ()

void        gnome_db_server_function_set_sqlname
                                            (GnomeDbServerFunction *func,
                                             const gchar *sqlname);

Set the SQL name of the data type.

func : a GnomeDbServerFunction object
sqlname :

gnome_db_server_function_get_sqlname ()

const gchar* gnome_db_server_function_get_sqlname
                                            (GnomeDbServerFunction *func);

Get the DBMS's name of a data type.

func : a GnomeDbServerFunction object
Returns : the name of the data type

gnome_db_server_function_set_arg_types ()

void        gnome_db_server_function_set_arg_types
                                            (GnomeDbServerFunction *func,
                                             const GSList *arg_types);

Set the arguments types of a function

func : a GnomeDbServerFunction object
arg_types : a list of GnomeDbServerDataType objects or NULL values ordered to represent the data types of the function's arguments .

gnome_db_server_function_get_arg_types ()

const GSList* gnome_db_server_function_get_arg_types
                                            (GnomeDbServerFunction *func);

To consult the list of arguments types (and number) of a function.

func : a GnomeDbServerFunction object
Returns : a list of GnomeDbServerDataType objects, the list MUST NOT be modified.

gnome_db_server_function_set_ret_type ()

void        gnome_db_server_function_set_ret_type
                                            (GnomeDbServerFunction *func,
                                             GnomeDbServerDataType *dt);

Set the return type of a function

func : a GnomeDbServerFunction object
dt : a GnomeDbServerDataType object or NULL

gnome_db_server_function_get_ret_type ()

GnomeDbServerDataType* gnome_db_server_function_get_ret_type
                                            (GnomeDbServerFunction *func);

To consult the return type of a function.

func : a GnomeDbServerFunction object
Returns : a GnomeDbServerDataType object.

gnome_db_server_function_accepts_args ()

gboolean    gnome_db_server_function_accepts_args
                                            (GnomeDbServerFunction *func,
                                             const GSList *arg_types);

Test if the proposed list of arguments (arg_types) would be accepted by the func function.

The non acceptance can be beause of data type incompatibilities or a wrong number of data types.

func : a GnomeDbServerFunction object
arg_types : a list of GnomeDbServerDataType objects or NULL values, ordered
Returns : TRUE if accepted

Property Details

The "prop" property

  "prop"                 gpointer              : Read / Write

Signal Details

The "templ-signal" signal

void        user_function                  (GnomeDbServerFunction *dbserverfunction,
                                            gpointer               user_data)             : Run first

dbserverfunction : the object which received the signal.
user_data : user data set when the signal handler was connected.