Skip to content

Handle nothing as missing in binding. #236

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
Mar 19, 2021

Conversation

BenjaminGalliot
Copy link
Contributor

@BenjaminGalliot BenjaminGalliot commented Mar 19, 2021

Related to this issue.

I added a method for bind! function, and it solves my problem seen in previous MWE, but do I need to also add something on sqlitetype function (and its related test)?

Currently, with only bind! added, I have this:

julia> SQLite.sqlitetype(Missing)
"NULL"

julia> SQLite.sqlitetype(Nothing)
"BLOB NOT NULL"

Tell me if further modifications are needed.

@codecov
Copy link

codecov bot commented Mar 19, 2021

Codecov Report

Merging #236 (85c8176) into master (f3da928) will decrease coverage by 0.02%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #236      +/-   ##
==========================================
- Coverage   83.30%   83.27%   -0.03%     
==========================================
  Files           5        5              
  Lines         605      610       +5     
==========================================
+ Hits          504      508       +4     
- Misses        101      102       +1     
Impacted Files Coverage Δ
src/SQLite.jl 96.21% <50.00%> (-0.40%) ⬇️
src/api.jl 40.98% <0.00%> (+0.48%) ⬆️
src/consts.jl 90.90% <0.00%> (+2.02%) ⬆️

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 f3da928...85c8176. Read the comment docs.

@quinnj
Copy link
Member

quinnj commented Mar 19, 2021

Yeah, looks like we need sqlitetype(::Type{Nothing}) = "NULL" in the SQLite.jl file.

@quinnj quinnj merged commit deaeaf5 into JuliaDatabases:master Mar 19, 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