Skip to content

Conversation

@SRombauts
Copy link
Owner

Fix #430 for a better support of standard containers

Also add a couple of tests (not covering all variants)

Fix #430 for a better support of standard containers

Also add a couple of tests (not covering all variants)
@SRombauts SRombauts self-assigned this Jun 12, 2023
@SRombauts
Copy link
Owner Author

SRombauts commented Jun 12, 2023

It's not a "real-life issue" since SQLiteCpp can only bind a blob with a size in int.
I created a PR nonetheless, but I'll take the time to think about it twice; it might be better in fact to NOT try to hide that API and let the developer know

@hellow554
Copy link

hellow554 commented Apr 15, 2025

I am currently using this great library. Thank you for this!

One issue I'm running into is binding a blob breaks the variadic binding possiblity, because it requires two parameters, not one.

So I would like to introduce a new struct Blob or similar, that wraps a void pointer and std::size_t, so I can use it in a variadic binding suitation, e.g.:

// [...]
struct Blob {
    const void *ptr;
    std::size_t size;
};
SQLite::bind(st, "ABC", 2, SQLite::Blob{"def", 3});

I think this would perfectly fit in this PR, what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Binding BLOB requires narrowing conversion

3 participants