Lines Matching refs:midx
10 struct _JBMIDX *midx = &ctx->midx; in _jbi_consume_eq() local
11 JBIDX idx = midx->idx; in _jbi_consume_eq()
13 midx->cursor_step = IWKV_CURSOR_PREV; in _jbi_consume_eq()
45 } while (step && !(rc = iwkv_cursor_to(cur, step > 0 ? midx->cursor_step : cursor_reverse_step))); in _jbi_consume_eq()
74 struct _JBMIDX *midx = &ctx->midx; in _jbi_consume_in_node() local
75 JBIDX idx = midx->idx; in _jbi_consume_in_node()
149 struct _JBMIDX *midx = &ctx->midx; in _jbi_consume_scan() local
150 JBIDX idx = midx->idx; in _jbi_consume_scan()
151 jqp_op_t expr1_op = midx->expr1->op->value; in _jbi_consume_scan()
158 key.compound = (midx->cursor_step == IWKV_CURSOR_PREV) ? INT64_MIN : INT64_MAX; in _jbi_consume_scan()
160 iwrc rc = iwkv_cursor_open(idx->idb, &cur, midx->cursor_init, &key); in _jbi_consume_scan()
164 midx->cursor_init = IWKV_CURSOR_BEFORE_FIRST; in _jbi_consume_scan()
165 midx->cursor_step = IWKV_CURSOR_NEXT; in _jbi_consume_scan()
166 rc = iwkv_cursor_open(idx->idb, &cur, midx->cursor_init, 0); in _jbi_consume_scan()
168 if (!midx->expr2) { // Fail fast in _jbi_consume_scan()
169 midx->expr2 = midx->expr1; in _jbi_consume_scan()
175 if (midx->cursor_init < IWKV_CURSOR_NEXT) { // IWKV_CURSOR_BEFORE_FIRST || IWKV_CURSOR_AFTER_LAST in _jbi_consume_scan()
176 rc = iwkv_cursor_to(cur, midx->cursor_step); in _jbi_consume_scan()
180 IWKV_cursor_op cursor_reverse_step = (midx->cursor_step == IWKV_CURSOR_PREV) in _jbi_consume_scan()
193 if ( midx->expr2 in _jbi_consume_scan()
194 && !midx->expr2->prematched in _jbi_consume_scan()
195 && !jbi_node_expr_matched(ctx->ux->q->aux, midx->idx, cur, midx->expr2, &rc)) { in _jbi_consume_scan()
199 && !jbi_node_expr_matched(ctx->ux->q->aux, midx->idx, cur, midx->expr1, &rc)) { in _jbi_consume_scan()
207 if (!midx->expr1->prematched && matched && (expr1_op != JQP_OP_PREFIX)) { in _jbi_consume_scan()
209 midx->expr1->prematched = true; in _jbi_consume_scan()
214 } while (step && !(rc = iwkv_cursor_to(cur, step > 0 ? midx->cursor_step : cursor_reverse_step))); in _jbi_consume_scan()
230 struct _JBMIDX *midx = &ctx->midx; in _jbi_consume_noxpr_scan() local
231 IWKV_cursor_op cursor_reverse_step = (midx->cursor_step == IWKV_CURSOR_PREV) in _jbi_consume_noxpr_scan()
234 iwrc rc = iwkv_cursor_open(midx->idx->idb, &cur, midx->cursor_init, 0); in _jbi_consume_noxpr_scan()
236 if (midx->cursor_init < IWKV_CURSOR_NEXT) { // IWKV_CURSOR_BEFORE_FIRST || IWKV_CURSOR_AFTER_LAST in _jbi_consume_noxpr_scan()
237 rc = iwkv_cursor_to(cur, midx->cursor_step); in _jbi_consume_noxpr_scan()
258 } while (step && !(rc = iwkv_cursor_to(cur, step > 0 ? midx->cursor_step : cursor_reverse_step))); in _jbi_consume_noxpr_scan()
272 struct _JBMIDX *midx = &ctx->midx; in jbi_dup_scanner() local
273 if (!midx->expr1) { in jbi_dup_scanner()
277 JQVAL *jqval = jql_unit_to_jqval(qp->aux, midx->expr1->right, &rc); in jbi_dup_scanner()
279 switch (midx->expr1->op->value) { in jbi_dup_scanner()
294 if ((midx->expr1->op->value == JQP_OP_GT) && (jqval->type == JQVAL_I64)) { in jbi_dup_scanner()