# mco_fh_metadata_add

> Provide metadata to the feed handler.

### Prototype

        mco_fh_ret mco_fh_metadata_add(/*IN*/ mco_fh_db_h db,
                            /*IN*/ const char *rec_type,
                            /*IN*/ const char *field_name,
                            /*IN*/ mco_int4 field_type,
                            /*IN*/ mco_size_t field_size,
                            /*IN*/ mco_size_t field_precision);

### Arguments

h | The database handle
rec_type | The type of the record containing the field
field_name | The name of the field
type | The field type (one of McoSql::tp* constants).
size | The field size (for string fields only)
precision | The field precision

### Description

> This function is called by the handler module's `mco_fh_mod_fill_metadata()` function to provide metadata to the feed handler.

### Return Codes

MCO_FH_OK | Metadata successfully added
MCO_FH_E_BAD_HANDLE | The database handle is invalid

### Example

        mco_fh_ret mco_fh_mod_fill_metadata(mco_fh_module_h h)
        {
            mco_fh_metadata_add(db, “Quote”, “symbol”, McoSql::tpString, 4, 0);
            mco_fh_metadata_add(db, “Quote”, “exchangeCode”, McoSql::tpInt4, 0, 0);
            mco_fh_metadata_add(db, “Quote”, “bid”, McoSql::tpReal4, 0, 0);
            mco_fh_metadata_add(db, “Quote”, “ask”, McoSql::tpReal4, 0, 0);
            mco_fh_metadata_add(db, “Quote”, “isNBBO”, McoSql::tpBool, 0, 0);
            return MCO_FH_OK;
        }