Database - Relation: liblangtag Documentation

## Database - Relation Database - Relation — An interface to access relation database |

## Functions

lt_relation_db_t * | lt_relation_db_new ()
lt_relation_db_t * | lt_relation_db_ref ()
void | lt_relation_db_unref ()
lt_list_t * | lt_relation_db_lookup_lang_from_script ()
lt_list_t * | lt_relation_db_lookup_script_from_lang ()

## Types and Values

| lt_relation_db_t

## Description

This class providdes an interface to access Relation database.

## Functions

### lt_relation_db_new ()

    lt_relation_db_t *
    lt_relation_db_new (void);

Create a new instance of a lt_relation_db_t.

#### Returns

a new instance of lt_relation_db_t.

[transfer full]

### lt_relation_db_ref ()

    lt_relation_db_t *
    lt_relation_db_ref (lt_relation_db_t *relationdb);

Increases the reference count of `relationdb` .

#### Parameters

relationdb | a lt_relation_db_t. |

#### Returns

the same `relationddb` object.

[transfer none]

### lt_relation_db_unref ()

    void
    lt_relation_db_unref (lt_relation_db_t *relationdb);

Decreases the reference count of `relationdb` . when its reference count drops to 0, the object is finalized (i.e. its memory is freed).

#### Parameters

relationdb | a lt_relation_db_t. |

### lt_relation_db_lookup_lang_from_script ()

    lt_list_t *
    lt_relation_db_lookup_lang_from_script
                                   (lt_relation_db_t *relationdb,
                                    const lt_script_t *script);

Look up the languages corresponding to the script `script` .

#### Parameters

relationdb | a lt_relation_db_t. |
script | a lt_script_t. |

#### Returns

a lt_list_t containing lt_lang_t object.

[transfer full]

### lt_relation_db_lookup_script_from_lang ()

    lt_list_t *
    lt_relation_db_lookup_script_from_lang
                                   (lt_relation_db_t *relationdb,
                                    const lt_lang_t *lang);

Look up the scripts corresponding to the language `lang` .

#### Parameters

relationdb | a lt_relation_db_t. |
lang | a lt_lang_t. |

#### Returns

a lt_list_t containing lt_script_t objects.

[transfer full]

## Types and Values

### lt_relation_db_t

    typedef struct _lt_relation_db_t lt_relation_db_t;

All the fields in the lt_relation_db_t structure are private to the lt_relation_db_t implementation.