-
Notifications
You must be signed in to change notification settings - Fork 516
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
cannot bind to long long (64 bit signed integer)? #462
Comments
This works for me (with apple clang 15) int64_t i64 = 0;
statement.bind(1, i64); Can you provide more information, code, platform, compiler, actual error? |
I see, I think the problem is using
It would be nice to have a version explicitly for I'm using g++ 11.4 on Ubuntu 22.04. |
I see and I agree. I'd simply start with this: void SQLite::Statement::bind(int index, long long value) {
static_assert(sizeof(long long) == sizeof(int64_t));
bind(index, int64_t(value));
} And improve it only if there's a demand supporting platforms where sizeof(long long) is different. |
I think the user should be aware of how sqlite expects the types, probably using some templates/concepts could help, however this should be optional as it will break for some users |
Hi, I was trying to bind an SQLite::Statement with
?
to the typelong long
, with member functionbind(1, i)
. But there's a compiler error, I had to cast the integer to 32bit int to make it work. Is this a limitation of sqlite3 itself or just SQLiteCpp?I'm using version 3.2.1
The text was updated successfully, but these errors were encountered: