![]() |
![]() |
![]() |
Libgnomedb Reference Manual | ![]() |
---|---|---|---|---|
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);
"templ-signal" void user_function (GnomeDbServerFunction *dbserverfunction, gpointer user_data) : Run first
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.
typedef struct _GnomeDbServerFunctionPrivate GnomeDbServerFunctionPrivate;
GObject* gnome_db_server_function_new (GnomeDbServer *srv);
Creates a new GnomeDbServerFunction object
srv : |
a GnomeDbServer object |
Returns : | the new object |
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 |
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 |
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 : |
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 |
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 . |
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. |
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 |
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. |
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 |
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. |