gwenn
gwenn
https://sqlite.org/lang_mathfunc.html > The math functions shown below are part of the [SQLite amalgamation source file](https://sqlite.org/amalgamation.html) but are only active if the amalgamation is compiled using the [-DSQLITE_ENABLE_MATH_FUNCTIONS](https://sqlite.org/compile.html#enable_math_functions) compile-time option. So...
Currently, we don't include them because SQLite doesn't include them by default. I mean the SQLite3 library, not the SQLite3 CLI. https://sqlite.org/lang_mathfunc.html > are **only active** if the amalgamation is...
For [Number](https://docs.serde.rs/serde_json/value/enum.Value.html#variant.Number), I guess we should fix [FromSql](https://github.com/rusqlite/rusqlite/blob/master/src/types/serde_json.rs#L23) if SQLite type is [Integer](https://docs.rs/rusqlite/0.24.2/rusqlite/types/enum.Type.html#variant.Integer) or [Real](https://docs.rs/rusqlite/0.24.2/rusqlite/types/enum.Type.html#variant.Real). For [Null](https://docs.serde.rs/serde_json/value/enum.Value.html#variant.Null), I am not sure: a "null" string is expected and not [NULL](https://docs.rs/rusqlite/0.24.2/rusqlite/types/enum.Type.html#variant.Null), no...
```sh sqlite> SELECT json_valid(NULL); -- not valid... 0 sqlite> SELECT json_valid('null'); 1 sqlite> SELECT json_valid('text'); -- not valid... 0 sqlite> SELECT json_valid('"text"'); 1 ``` Should we [quote](https://sqlite.org/json1.html#jquote) ? When ?...
I mean SQL `NULL` is not a valid JSON value (only 'null' literal is valid). And SQL literal 'text' is not a valid JSON value (only '"text"' is valid).
But for 'text', we don't know until parsed ! ```patch Index: src/types/serde_json.rs =================================================================== diff --git a/src/types/serde_json.rs b/src/types/serde_json.rs --- a/src/types/serde_json.rs (revision d5b5f4301545d85d6cc08390ebb9a64930b5480e) +++ b/src/types/serde_json.rs (date 1611176061245) @@ -1,6 +1,6 @@ //!...
So your SQLite values are not really JSON values (serialized to text) !
I am reluctant to put this logic in `rusqlite`.
Could you please tell us which line(s) in https://github.com/rusqlite/rusqlite/blob/master/src/blob.rs#L25-L49 are confusing ? And rusqlite is just a SQLite wrapper. You may find more explanations [here](https://sqlite.org/c3ref/blob_open.html).
`api_routines_stub` feature does not seem to be used anywhere ! Am I missing something ?