Re: [sqlite] RFE: allow parameters in PRAGMA statements

2019-06-11 Thread Clemens Ladisch
Wout Mertens wrote: > I am using the user_version pragma for implementing an event-handling > database. I'd like to prepare the statement to update it, e.g. `PRAGMA > user_version = ?`. > > However, sqlite3 won't let me do that, so I just run the text query every > time with the number embedded.

Re: [sqlite] RFE: allow parameters in PRAGMA statements

2019-06-11 Thread Graham Holden
I suspect this doesn't happen because from an in-expert bit of poking, I don't think PRAGMA commands "really" get compiled to VDBE (which is what I believe "preparing" a statement does). In the transcript below, although the _query_ seems to use VDBE (to return the result in "p4", the two

Re: [sqlite] RFE: allow parameters in PRAGMA statements

2019-06-11 Thread Mike King
I’ve got a similar issue. I user user_version to store a .net version object I’ve serialised as an int. I convert them to/from text to get them in and out using the pragma. It would be a nice to have for pragmas to support parameters. Cheers On Tue, 11 Jun 2019 at 14:43, Wout Mertens wrote: >

[sqlite] RFE: allow parameters in PRAGMA statements

2019-06-11 Thread Wout Mertens
Hi, I am using the user_version pragma for implementing an event-handling database. I'd like to prepare the statement to update it, e.g. `PRAGMA user_version = ?`. However, sqlite3 won't let me do that, so I just run the text query every time with the number embedded. Not a huge problem, more