Skip to content

Update to SQLite 1.0#20

Merged
davidanthoff merged 1 commit intomasterfrom
update
Feb 14, 2020
Merged

Update to SQLite 1.0#20
davidanthoff merged 1 commit intomasterfrom
update

Conversation

@davidanthoff
Copy link
Copy Markdown
Member

I also handled the db that is modified a little different so it doesn't show up as dirty in git anymore.

@bramtayl
Copy link
Copy Markdown
Collaborator

bramtayl commented Feb 14, 2020

This looks good. Do you know why SQLite got rid of generate_namedtuple? If you'd like to avoid generated functions (in exchange for a @pure function), I have a function in LightQuery like this:

@pure function val_fieldtypes(a_type::DataType)
    if a_type.abstract || (a_type.name == Tuple.name && Base.isvatuple(a_type))
        () # for our purposes, we might want to error here
    else
        map(Val, (a_type.types...,))
    end
end

Once you've got the field types wrapped in Val, @inline can take care of the rest.

@davidanthoff
Copy link
Copy Markdown
Member Author

Do you know why SQLite got rid of generate_namedtuple?

No idea :)

If you'd like to avoid generated functions

I think I'm indifferent. If you think that would be better, please open a PR!

Tests fail, but tests also seem to fail on master, so maybe I'll merge and then we can figure out what is wrong there?

@davidanthoff davidanthoff merged commit 744d179 into master Feb 14, 2020
@davidanthoff davidanthoff deleted the update branch February 14, 2020 02:48
@bramtayl
Copy link
Copy Markdown
Collaborator

I'm not used to reading the CI results from GitHub actions, but the error I'm seeing is on 32 bit Linux:

│ collect(result)[1].a isa DataValue{Int}
│ 
│ Evaluated output:
│ 
│ ERROR: InexactError: trunc(Int32, -342205098811609859)

With a stacktrace leading back to this line in SQLite. Which suggests to me this might be an SQlite.jl bug related to 32 bit Ints?

@davidanthoff
Copy link
Copy Markdown
Member Author

@quinnj, do you think this might be a problem in SQLite.jl?

@quinnj
Copy link
Copy Markdown

quinnj commented Feb 26, 2020

Sorry, I think I'm missing some context here; I'm not sure what I can do to help. Is there a simple reproduction of a bug in SQLite.jl? If so, or some outline of the problem, I'm happy to take a look; even better, open an issue w/ SQLite.jl w/ the details.

@bramtayl
Copy link
Copy Markdown
Collaborator

Ref JuliaDatabases/SQLite.jl#207

@bramtayl
Copy link
Copy Markdown
Collaborator

Thanks!

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.

3 participants