SQLite Forum

Where is sqlite3_stmt struct defined

Where is sqlite3_stmt struct defined

(1.1) By curmudgeon on 2022-01-19 15:47:39 edited from 1.0 [link] [source]

All I can find in sqlite3.c is

typedef struct sqlite3_stmt sqlite3_stmt;

and no definition in sqlite3.h.

I'm wanting to use the sqlite3TreeViewExpr, sqlite3TreeViewSelect & sqlite3TreeViewExprList functions in the debugger but I'm lost trying to work out where I get the pExpr, pSelect & pExprList parameters.

(2) By Larry Brasfield (larrybr) on 2022-01-19 15:57:09 in reply to 1.1 [link] [source]

Look for this text in sqlite3.c: ** The "sqlite3_stmt" structure pointer that is returned by sqlite3_prepare() ** is really a pointer to an instance of this structure. .

(3.1) By curmudgeon on 2022-01-19 17:01:10 edited from 3.0 in reply to 2 [link] [source]

Thanks Larry. When I seen that 'struct Vdbe' I got a feeling of deja vu as I'm sure I tried this before.

I've went from struct Vdbe to struct Parse to struct ExprList. Within struct ExprList there's a struct ExprList_item which contains

Expr *pExpr; // The parse tree for this expression

Where do I find the definition of Expr? I can find no instance of struct Expr.

I've yet to come across pSelect.

(4) By anonymous on 2022-01-19 18:19:47 in reply to 3.1 [link] [source]

They're defined in sqliteInt.h. Search for "struct Expr", "struct Select", etc.

(5) By curmudgeon on 2022-01-19 18:35:50 in reply to 4 [source]

Thanks anon.