Skip to content

Report the failing INSERT when load!() errors #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2021

Conversation

bks-nist
Copy link
Contributor

@bks-nist bks-nist commented Dec 2, 2021

SQLite3 provides sqlite3_expanded_sql() to retrieve the as-bound statement text; this makes it possible to report the exact failing INSERT when load!() fails, e.g. due to a PRIMARY KEY violation.

I found it very useful when debugging all the various ways a pre-existing data source violated its own nominal schema.

SQLite3 provides `sqlite3_expanded_sql()` to retrieve the _as-bound_
statement text; this makes it possible to report the exact failing
INSERT when `load!()` fails, e.g. due to a `PRIMARY KEY` violation.
@codecov
Copy link

codecov bot commented Dec 2, 2021

Codecov Report

Merging #277 (4c10bc2) into master (f9c7d62) will increase coverage by 0.41%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #277      +/-   ##
==========================================
+ Coverage   85.46%   85.87%   +0.41%     
==========================================
  Files           5        5              
  Lines         688      701      +13     
==========================================
+ Hits          588      602      +14     
+ Misses        100       99       -1     
Impacted Files Coverage Δ
src/SQLite.jl 96.12% <88.88%> (-0.27%) ⬇️
src/api.jl 57.14% <100.00%> (+2.36%) ⬆️
src/tables.jl 99.30% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9c7d62...4c10bc2. Read the comment docs.

Copy link
Member

@quinnj quinnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! Thanks!

@quinnj quinnj merged commit 0517515 into JuliaDatabases:master Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants