Lines Matching refs:midx
10 struct _JBMIDX *midx = &ctx->midx; in _jbi_consume_eq() local
14 jbi_jqval_fill_ikey(midx->idx, jqval, &key, numbuf); in _jbi_consume_eq()
18 iwrc rc = iwkv_get_copy(midx->idx->idb, &key, numbuf, sizeof(numbuf), &sz); in _jbi_consume_eq()
41 struct _JBMIDX *midx = &ctx->midx; in _jbi_consume_in_node() local
49 jbi_jqval_fill_ikey(midx->idx, &jqv, &key, numbuf); in _jbi_consume_in_node()
53 rc = iwkv_get_copy(midx->idx->idb, &key, numbuf, sizeof(numbuf), &sz); in _jbi_consume_in_node()
85 struct _JBMIDX *midx = &ctx->midx; in _jbi_consume_scan() local
86 JBIDX idx = midx->idx; in _jbi_consume_scan()
87 jqp_op_t expr1_op = midx->expr1->op->value; in _jbi_consume_scan()
92 iwrc rc = iwkv_cursor_open(idx->idb, &cur, midx->cursor_init, &key); in _jbi_consume_scan()
95 midx->cursor_init = IWKV_CURSOR_BEFORE_FIRST; in _jbi_consume_scan()
96 midx->cursor_step = IWKV_CURSOR_NEXT; in _jbi_consume_scan()
97 rc = iwkv_cursor_open(idx->idb, &cur, midx->cursor_init, 0); in _jbi_consume_scan()
99 if (!midx->expr2) { // Fail fast in _jbi_consume_scan()
100 midx->expr2 = midx->expr1; in _jbi_consume_scan()
106 IWKV_cursor_op cursor_reverse_step = (midx->cursor_step == IWKV_CURSOR_NEXT) in _jbi_consume_scan()
109 if (midx->cursor_init < IWKV_CURSOR_NEXT) { // IWKV_CURSOR_BEFORE_FIRST || IWKV_CURSOR_AFTER_LAST in _jbi_consume_scan()
110 rc = iwkv_cursor_to(cur, midx->cursor_step); in _jbi_consume_scan()
130 if ( midx->expr2 in _jbi_consume_scan()
131 && !midx->expr2->prematched in _jbi_consume_scan()
132 && !jbi_node_expr_matched(ctx->ux->q->aux, midx->idx, cur, midx->expr2, &rc)) { in _jbi_consume_scan()
136 && !jbi_node_expr_matched(ctx->ux->q->aux, midx->idx, cur, midx->expr1, &rc)) { in _jbi_consume_scan()
144 if (!midx->expr1->prematched && matched && (expr1_op != JQP_OP_PREFIX)) { in _jbi_consume_scan()
146 midx->expr1->prematched = true; in _jbi_consume_scan()
149 } while (step && !(rc = iwkv_cursor_to(cur, step > 0 ? midx->cursor_step : cursor_reverse_step))); in _jbi_consume_scan()
166 struct _JBMIDX *midx = &ctx->midx; in _jbi_consume_noxpr_scan() local
167 IWKV_cursor_op cursor_reverse_step = (midx->cursor_step == IWKV_CURSOR_NEXT) in _jbi_consume_noxpr_scan()
170 iwrc rc = iwkv_cursor_open(midx->idx->idb, &cur, midx->cursor_init, 0); in _jbi_consume_noxpr_scan()
172 if (midx->cursor_init < IWKV_CURSOR_NEXT) { // IWKV_CURSOR_BEFORE_FIRST || IWKV_CURSOR_AFTER_LAST in _jbi_consume_noxpr_scan()
173 rc = iwkv_cursor_to(cur, midx->cursor_step); in _jbi_consume_noxpr_scan()
198 } while (step && !(rc = iwkv_cursor_to(cur, step > 0 ? midx->cursor_step : cursor_reverse_step))); in _jbi_consume_noxpr_scan()
212 struct _JBMIDX *midx = &ctx->midx; in jbi_uniq_scanner() local
213 if (!midx->expr1) { in jbi_uniq_scanner()
217 JQVAL *jqval = jql_unit_to_jqval(qp->aux, midx->expr1->right, &rc); in jbi_uniq_scanner()
219 switch (midx->expr1->op->value) { in jbi_uniq_scanner()
233 if ((midx->expr1->op->value == JQP_OP_GT) && (jqval->type == JQVAL_I64)) { in jbi_uniq_scanner()