## MgServerAggregate

MgServerAggregate — Represents an aggregate in the DBMS (like `COUNT()` or `AVG()` for example)

## Synopsis

    struct      MgServerAggregate;
    guint       mg_server_aggregate_get_type    (void);
    GObject*    mg_server_aggregate_new         (MgServer *srv);
    void        mg_server_aggregate_set_dbms_id (MgServerAggregate *agg,
                                                 const gchar *id);
    const gchar* mg_server_aggregate_get_dbms_id
                                                (MgServerAggregate *agg);
    void        mg_server_aggregate_set_sqlname (MgServerAggregate *agg,
                                                 const gchar *sqlname);
    const gchar* mg_server_aggregate_get_sqlname
                                                (MgServerAggregate *agg);
    void        mg_server_aggregate_set_arg_type
                                                (MgServerAggregate *agg,
                                                 MgServerDataType *dt);
    MgServerDataType* mg_server_aggregate_get_arg_type
                                                (MgServerAggregate *agg);
    void        mg_server_aggregate_set_ret_type
                                                (MgServerAggregate *agg,
                                                 MgServerDataType *dt);
    MgServerDataType* mg_server_aggregate_get_ret_type
                                                (MgServerAggregate *agg);

## Object Hierarchy

      GObject
       +----MgBase
             +----MgServerAggregate

## Implemented Interfaces

MgServerAggregate implements MgXmlStorage.

## Properties

      "prop"                 gpointer             : Read / Write

## Signal Prototypes

    "templ-signal"
                void        user_function      (MgServerAggregate *mgserveraggregate,
                                                gpointer user_data);

## Description

Because aggregates 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 an aggregate.

It implements the MgXmlStorage interface.

## Details

### struct MgServerAggregate

    struct MgServerAggregate;

### mg_server_aggregate_get_type ()

    guint       mg_server_aggregate_get_type    (void);

Returns : |

### mg_server_aggregate_new ()

    GObject*    mg_server_aggregate_new         (MgServer *srv);

Creates a new MgServerAggregate object

`srv` : | a MgServer object
Returns : | the new object

### mg_server_aggregate_set_dbms_id ()

    void        mg_server_aggregate_set_dbms_id (MgServerAggregate *agg,
                                                 const gchar *id);

Set the DBMS identifier of the aggregate

`agg` : | a MgServerAggregate object
`id` : | the DBMS identifier

### mg_server_aggregate_get_dbms_id ()

    const gchar* mg_server_aggregate_get_dbms_id
                                                (MgServerAggregate *agg);

Get the DBMS identifier of the aggregate

`agg` : | a MgServerAggregate object
Returns : | the aggregate's id

### mg_server_aggregate_set_sqlname ()

    void        mg_server_aggregate_set_sqlname (MgServerAggregate *agg,
                                                 const gchar *sqlname);

Set the SQL name of the data type.

`agg` : | a MgServerAggregate object
`sqlname` : |

### mg_server_aggregate_get_sqlname ()

    const gchar* mg_server_aggregate_get_sqlname
                                                (MgServerAggregate *agg);

Get the DBMS's name of a data type.

`agg` : | a MgServerAggregate object
Returns : | the name of the data type

### mg_server_aggregate_set_arg_type ()

    void        mg_server_aggregate_set_arg_type
                                                (MgServerAggregate *agg,
                                                 MgServerDataType *dt);

Set the argument type of a aggregate

`agg` : | a MgServerAggregate object
`dt` : | a MgServerDataType objects or NULL value to represent the data type of the aggregate's unique argument .

### mg_server_aggregate_get_arg_type ()

    MgServerDataType* mg_server_aggregate_get_arg_type
                                                (MgServerAggregate *agg);

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

`agg` : | a MgServerAggregate object
Returns : | a list of MgServerDataType objects, the list MUST NOT be modified.

### mg_server_aggregate_set_ret_type ()

    void        mg_server_aggregate_set_ret_type
                                                (MgServerAggregate *agg,
                                                 MgServerDataType *dt);

Set the return type of a aggregate

`agg` : | a MgServerAggregate object
`dt` : | a MgServerDataType object or NULL

### mg_server_aggregate_get_ret_type ()

    MgServerDataType* mg_server_aggregate_get_ret_type
                                                (MgServerAggregate *agg);

To consult the return type of a aggregate.

`agg` : | a MgServerAggregate object
Returns : | a MgServerDataType object.

## Properties

"`prop`" (gpointer : Read / Write) |

## Signals

### The "templ-signal" signal

    void        user_function                  (MgServerAggregate *mgserveraggregate,
                                                gpointer user_data);

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