better-sqlite3
better-sqlite3 copied to clipboard
Verbose: max length
Hello,
I'm trying to use the "verbose" option to debug my code, however I'm running into a problem: the verbose option has a max length. When I want to debug large queries, I get this: UPDATE
dataSET
value='{"excelRead":{"Blad1":["Serial",'/*+13627 bytes*/ WHERE
key = 'page-TNjmvagO3E' LIMIT 1
.
Is there a way to disable that /*+13627 bytes*/
so I can read the whole SQL query? Thanks for your help in advance!
Any update on my issue?
You can compile a custom version and set SQLITE_TRACE_SIZE_LIMIT
and SQLITE_LIMIT_LENGTH
to whatever size you need.
See:
https://www.sqlite.org/c3ref/expanded_sql.html https://github.com/WiseLibs/better-sqlite3/blob/master/docs/compilation.md https://github.com/WiseLibs/better-sqlite3/blob/6da9e569dbd3ad6d3e04b4cbd61c788c039d2ef3/src/objects/database.lzz#L67
The sqlite3_expanded_sql() interface returns NULL if insufficient memory is available to hold the result, or if the result would exceed the the maximum string length determined by the SQLITE_LIMIT_LENGTH. The SQLITE_TRACE_SIZE_LIMIT compile-time option limits the size of bound parameter expansions. The SQLITE_OMIT_TRACE compile-time option causes sqlite3_expanded_sql() to always return NULL.
I don't see these options being increased in the future for the default better-sqlite3.