libgdamm Reference Documentation

Main Page Namespaces Book

# Gnome::Gda::DictFunction Class Reference

Represents a function in the DBMS. More...

Inheritance diagram for Gnome::Gda::DictFunction:

[legend]
List of all members.

## Public Member Functions

bool | accepts_arg_dict_types (const Glib::SListHandle<DictType>& arg_types)
| Test if the proposed list of arguments ( arg_types) would be accepted by the func function.
Glib::ustring | get_dbms_id () const
| Get the DBMS identifier of the function.
Glib::RefPtr<const DictType> | get_ret_dict_type () const
| To consult the return type of a function.
Glib::RefPtr<DictType> | get_ret_dict_type ()
| To consult the return type of a function.
Glib::ustring | get_sqlname () const
| Get the DBMS's name of a data type.
const GdaDictFunction* | gobj () const
| Provides access to the underlying C GObject.
GdaDictFunction* | gobj ()
| Provides access to the underlying C GObject.
GdaDictFunction* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void | set_arg_dict_types (const Glib::SListHandle<DictType>& arg_types)
| Set the arguments types of a function.
void | set_dbms_id (const Glib::ustring& id)
| Set the DBMS identifier of the function.
void | set_ret_dict_type (const Glib::RefPtr<DictType>& dt)
| Set the return type of a function.
void | set_sqlname (const Glib::ustring& sqlname)
| Set the SQL name of the data type.
virtual | ~DictFunction ()

## Static Public Member Functions

static Glib::RefPtr<DictFunction> | create (const Glib::RefPtr<Dict>& dict)

## Protected Member Functions

| DictFunction (const Glib::RefPtr<Dict>& dict)

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr<Gnome::Gda::DictFunction> | wrap (GdaDictFunction* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

Represents a function in the DBMS.

DictFunction represents a function, with zero or more input parameters, and one and only one return type. Therefore it does not represent procedures which do not return any data type. Also the argument types are always of the IN kind (no OUT or IN OUT arguments). There may one day be a specific object for procedures. Likewise, it does not represent a function returning a SET OF a given data type. There may one 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.

## Constructor & Destructor Documentation

virtual Gnome::Gda::DictFunction::~DictFunction | ( |  | ) | `[virtual]`

Gnome::Gda::DictFunction::DictFunction | ( | const Glib::RefPtr<Dict>& | dict | ) | `[explicit, protected]`

## Member Function Documentation

bool Gnome::Gda::DictFunction::accepts_arg_dict_types | ( | const Glib::SListHandle<DictType>& | 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.

Parameters:

  | arg_types | A list of Gda::DictType objects or #`0` values, ordered.

Returns:
  `true` if accepted.

static Glib::RefPtr<DictFunction> Gnome::Gda::DictFunction::create | ( | const Glib::RefPtr<Dict>& | dict | ) | `[static]`

Glib::ustring Gnome::Gda::DictFunction::get_dbms_id | ( |  | ) | const

Get the DBMS identifier of the function.

Returns:
  A new string with the function's id.

Glib::RefPtr<const DictType> Gnome::Gda::DictFunction::get_ret_dict_type | ( |  | ) | const

To consult the return type of a function.

Returns:
  A Gda::DictType object.

Glib::RefPtr<DictType> Gnome::Gda::DictFunction::get_ret_dict_type | ( |  | ) |

To consult the return type of a function.

Returns:
  A Gda::DictType object.

Glib::ustring Gnome::Gda::DictFunction::get_sqlname | ( |  | ) | const

Get the DBMS's name of a data type.

Returns:
  The name of the data type.

const GdaDictFunction* Gnome::Gda::DictFunction::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::Object.

GdaDictFunction* Gnome::Gda::DictFunction::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::Object.

GdaDictFunction* Gnome::Gda::DictFunction::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gnome::Gda::Object.

void Gnome::Gda::DictFunction::set_arg_dict_types | ( | const Glib::SListHandle<DictType>& | arg_types | ) |

Set the arguments types of a function.

Parameters:

  | arg_types | A list of Gda::DictType objects or #`0` values ordered to represent the data types of the function's arguments .

void Gnome::Gda::DictFunction::set_dbms_id | ( | const Glib::ustring & | id | ) |

Set the DBMS identifier of the function.

Parameters:

  | id | The DBMS identifier.

void Gnome::Gda::DictFunction::set_ret_dict_type | ( | const Glib::RefPtr<DictType>& | dt | ) |

Set the return type of a function.

Parameters:

  | dt | A Gda::DictType object or #`0`.

void Gnome::Gda::DictFunction::set_sqlname | ( | const Glib::ustring & | sqlname | ) |

Set the SQL name of the data type.

## Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::DictFunction> wrap | ( | GdaDictFunction * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  | object | The C instance.
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- dictfunction.h