![]() |
![]() |
![]() |
GNOME Data Access 3.0 manual | ![]() |
---|---|---|---|---|
GdaDictFunction; GObject* gda_dict_function_new (GdaDict *dict); void gda_dict_function_set_dbms_id (GdaDictFunction *func, const gchar *id); gchar* gda_dict_function_get_dbms_id (GdaDictFunction *func); void gda_dict_function_set_sqlname (GdaDictFunction *func, const gchar *sqlname); const gchar* gda_dict_function_get_sqlname (GdaDictFunction *func); void gda_dict_function_set_arg_dict_types (GdaDictFunction *func, const GSList *arg_types); const GSList* gda_dict_function_get_arg_dict_types (GdaDictFunction *func); void gda_dict_function_set_ret_dict_type (GdaDictFunction *func, GdaDictType *dt); GdaDictType* gda_dict_function_get_ret_dict_type (GdaDictFunction *func); gboolean gda_dict_function_accepts_arg_dict_types (GdaDictFunction *func, const GSList *arg_types);
The GdaDictFunction 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 GdaXmlStorage interface.
GObject* gda_dict_function_new (GdaDict *dict);
Creates a new GdaDictFunction object which rrpresents a function in the dictionary
dict : |
a GdaDict object |
Returns : | the new object |
void gda_dict_function_set_dbms_id (GdaDictFunction *func, const gchar *id);
Set the DBMS identifier of the function
func : |
a GdaDictFunction object |
id : |
the DBMS identifier |
gchar* gda_dict_function_get_dbms_id (GdaDictFunction *func);
Get the DBMS identifier of the function
func : |
a GdaDictFunction object |
Returns : | a new string with the function's id |
void gda_dict_function_set_sqlname (GdaDictFunction *func, const gchar *sqlname);
Set the SQL name of the data type.
func : |
a GdaDictFunction object |
sqlname : |
const gchar* gda_dict_function_get_sqlname (GdaDictFunction *func);
Get the DBMS's name of a data type.
func : |
a GdaDictFunction object |
Returns : | the name of the data type |
void gda_dict_function_set_arg_dict_types (GdaDictFunction *func, const GSList *arg_types);
Set the arguments types of a function
func : |
a GdaDictFunction object |
arg_types : |
a list of GdaDictType objects or NULL values ordered to represent the data types of the function's arguments . |
const GSList* gda_dict_function_get_arg_dict_types (GdaDictFunction *func);
To consult the list of arguments types (and number) of a function.
func : |
a GdaDictFunction object |
Returns : | a list of GdaDictType objects, the list MUST NOT be modified. |
void gda_dict_function_set_ret_dict_type (GdaDictFunction *func, GdaDictType *dt);
Set the return type of a function
func : |
a GdaDictFunction object |
dt : |
a GdaDictType object or NULL |
GdaDictType* gda_dict_function_get_ret_dict_type (GdaDictFunction *func);
To consult the return type of a function.
func : |
a GdaDictFunction object |
Returns : | a GdaDictType object. |
gboolean gda_dict_function_accepts_arg_dict_types (GdaDictFunction *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 GdaDictFunction object |
arg_types : |
a list of GdaDictType objects or NULL values, ordered |
Returns : | TRUE if accepted |