forked from jonasfj/trilite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
expr.h
29 lines (21 loc) · 748 Bytes
/
expr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef TRILITE_EXPR_H
#define TRILITE_EXPR_H
#include "config.h"
#include <sqlite3ext.h>
#include <stdbool.h>
/** Expression types */
enum expr_type{
EXPR_TRIGRAM = 1,
EXPR_OP = 1 << 1,
EXPR_AND = EXPR_OP | (1 << 2),
EXPR_OR = EXPR_OP | (1 << 3)
};
typedef enum expr_type expr_type;
int exprParsePatterns(expr**, bool*, trilite_vtab*, int, sqlite3_value**);
int exprParse(expr**, bool*, trilite_vtab*, const unsigned char*, int);
void exprRelease(expr*);
bool exprNextResult(expr**, sqlite3_int64*);
int exprSubstring(expr**, bool*, trilite_vtab*, const unsigned char*, int);
int exprTrigram(expr**, trilite_vtab*, trilite_trigram);
int exprOperator(expr**, expr*, expr*, expr_type);
#endif /* TRILITE_EXPR_H */