src/siri/db/series.c
/*
 * Call-back used to compare series properties.
 *
 * Returns 1 when series match or 0 if not.
 */
Call-back used to compare series properties.
Returns 1 when series match or 0 if not.
Call - back used to compare series properties . Returns 1 when series match or 0 if not .
int siridb_series_cexpr_cb(siridb_series_t * series, cexpr_condition_t * cond)
{
    switch (cond->prop)
    {
    case CLERI_GID_K_LENGTH:
        return cexpr_int_cmp(cond->operator, series->length, cond->int64);
    case CLERI_GID_K_START:
        return cexpr_int_cmp(cond->operator, series->start, cond->int64);
    case CLERI_GID_K_END:
        return cexpr_int_cmp(cond->operator, series->end, cond->int64);
    case CLERI_GID_K_POOL:
        return cexpr_int_cmp(cond->operator, series->pool, cond->int64);
    case CLERI_GID_K_TYPE:
        return cexpr_int_cmp(cond->operator, series->tp, cond->int64);
    case CLERI_GID_K_NAME:
        return cexpr_str_cmp(cond->operator, series->name, cond->str);
    }
    log_critical("Unexpected series property received: %d", cond->prop);
    assert (0);
    return -1;
}
int siridb_series_cexpr_cb ( siridb_series_t * series , cexpr_condition_t * cond ) { switch ( cond -> prop ) { case CLERI_GID_K_LENGTH : return cexpr_int_cmp ( cond -> operator , series -> length , cond -> int64 ) ; case CLERI_GID_K_START : return cexpr_int_cmp ( cond -> operator , series -> start , cond -> int64 ) ; case CLERI_GID_K_END : return cexpr_int_cmp ( cond -> operator , series -> end , cond -> int64 ) ; case CLERI_GID_K_POOL : return cexpr_int_cmp ( cond -> operator , series -> pool , cond -> int64 ) ; case CLERI_GID_K_TYPE : return cexpr_int_cmp ( cond -> operator , series -> tp , cond -> int64 ) ; case CLERI_GID_K_NAME : return cexpr_str_cmp ( cond -> operator , series -> name , cond -> str ) ; } log_critical ( " " , cond -> prop ) ; assert ( 0 ) ; return -1 ; }
Call-back used to compare series properties.
Call - back used to compare series properties .
/* we must NEVER get here */