sqlite: improve error reporting for prepared statements in SQLTagStore - #60227
sqlite: improve error reporting for prepared statements in SQLTagStore#60227islandryu wants to merge 3 commits into
Conversation
|
Review requested:
|
|
|
||
| test('failed prepares throw', () => { | ||
| assert.throws(() => { | ||
| sql.all`SELECT * FROM does_not_exist`; // eslint-disable-line no-unused-expressions |
There was a problem hiding this comment.
Consider configuring eslint with https://eslint.org/docs/latest/rules/no-unused-expressions#allowtaggedtemplates
There was a problem hiding this comment.
I have updated the ESLint configuration.
| message: 'Failed to prepare statement', | ||
| code: 'ERR_SQLITE_ERROR', | ||
| errcode: 1, | ||
| errstr: 'no such table: does_not_exist', |
There was a problem hiding this comment.
Wrong way around I think, see other comment.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #60227 +/- ##
========================================
Coverage 90.11% 90.12%
========================================
Files 752 751 -1
Lines 252200 252597 +397
Branches 47433 47527 +94
========================================
+ Hits 227267 227648 +381
- Misses 16239 16240 +1
- Partials 8694 8709 +15
🚀 New features to boost your workflow:
|
|
@islandryu Can you please rebase from main? |
Fixes: nodejs#60198 Signed-off-by: islandryu <shimaryuhei@gmail.com>
Signed-off-by: islandryu <shimaryuhei@gmail.com>
|
The lint errors need to be fixed. |
|
Why is this reverting was was done in #61096? |
|
If you're referring to src/node_sqlite.cc:4018, that's not a revert but a difference in approach. |
Fixes: #60198
I added report content for SQLTagStore.
Although the text in errstr differs from that of a conventional prepared statement, it now matches the corresponding SQLite function name.