Exemple #1
0
ConstField get(ConstContext ctx, const char* key, size_t key_length)
{
    const ib_field_t* result;

    throw_if_error(ib_module_constant_get(&result, ctx.ib(), key, key_length));

    return ConstField(result);
}
Exemple #2
0
ConstField ConstTransformation::execute(
    MemoryPool pool,
    ConstField input
) const
{
    const ib_field_t* result;
    throw_if_error(ib_tfn_execute(
        pool.ib(),
        ib(),
        input.ib(),
        &result
    ));

    return ConstField(result);
}
Exemple #3
0
static ib_status_t ibpp_transformation_translator(
    ib_mpool_t* mp,
    const ib_field_t* fin,
    const ib_field_t** fout,
    void *cbdata
)
{
    try {
        ConstTransformation::transformation_t transformation =
            data_to_value<ConstTransformation::transformation_t>(cbdata);

        ConstField result = transformation(MemoryPool(mp), ConstField(fin));

        *fout = result.ib();
    }
    catch (...) {
        return convert_exception();
    }

    return IB_OK;
}