SQLite Forum

Timeline
Login

9 forum posts by user paulvh

2020-10-08
13:04 Reply: API call instead of PRAGMA schema_version? (artifact: bb5db65226 user: paulvh)

...which is why I wrote I'd rather not do that.

2020-10-07
09:17 Reply: API call instead of PRAGMA schema_version? (artifact: e8ef43a73f user: paulvh)

A schema change hook would also be great...

09:15 Post: API call instead of PRAGMA schema_version? (artifact: 1720dccd07 user: paulvh)

Hi,

I can't find such, please let me know if there is one.

(I know I can get it by reading the header at offset 40, which I'd rather not do).

My reasoning is to be able to quickly check for a schema change to invalidate cached information about tables. There would probably be little difference in speed (compared to doing a PRAGMA) but we have sqlite3_table_column_metadata(), why not a sqlite3_schema_version() ?

Thanks,

Paul.

2020-05-22
13:29 Reply: Is there a json_unquote()? (artifact: 3785b11a45 user: paulvh)

OK, thanks, but I've made my own json_unquote now so that I can use it on a return value from another json function. I think this would be a sensible addition?

12:51 Post: Is there a json_unquote()? (artifact: 1fd7acd03d user: paulvh)

..to use a JSON string returned from the json functions?

2020-05-16
11:39 Post: Binding unknown to use column default (artifact: f00fb3a437 user: paulvh)

Hi,

Another small and useful request (I think).

If using a prepared cursor to INSERT, then when the input parameters is unknown, you have to use a different prepared cursor to exclude that column. (I don't want to bind a NULL because there is a DEFAULT for the column, specified by DDL).

Something like sqlite3_bind_unknown or sqlite3_bind_default would be great.

Thanks,

Paul.

2020-05-15
01:58 Post: Finding next ; in multi-statement SQL (artifact: 1411b0cf26 user: paulvh)
Hi,

sqlite3_prepare yields a pointer to the next statement through pzTail
sqlite3_complete finds the terminating ; (and skips ; inside a CREATE TRIGGER)

What I need is the location of the ; before preparing, e.g. if sqlite3_complete returned the position of the ; instead of 1 if it is present. Even better would be a pointer to the next statement (after skipping comments).

Is this possible without writing my own parser? If not, please accept it as a request.

Thanks,

Paul.
2020-04-20
15:59 Reply: CASE WHEN False THEN MyFunction() END calls MyFunction (artifact: fe6c1878b6 user: paulvh)

Fantastic. Thank you!

14:46 Post: CASE WHEN False THEN MyFunction() END calls MyFunction (artifact: c86a0ef6b0 user: paulvh)

Hi,

Is there something like SQLITE_DETERMINISTIC that would avoid MyFunction being called in this case?

I'm using SQLite quite successfully as a scripting engine, but the above surprised me.

Thanks,

Paul.