Skip to content
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

Compiling error: error: ‘sqlite_orm::internal::is_upsert_clause’ has not been declared #814 or higher #841

Closed
jairoareyes opened this issue Nov 18, 2021 · 13 comments

Comments

@jairoareyes
Copy link

jairoareyes commented Nov 18, 2021

Hi, I'm having problems compiling the recent versions. It works well for me until Merge #813, the higher versions throws me this error: sqlite_orm/sqlite_orm.h:10077:25: error: sqlite_orm::internal::is_upsert_clause’ has not been declared using internal::is_upsert_clause;`

It seems to be related to the upsert feature, that is indeed what I'm trying to test on my project. What should I do? Is there any other approach to meet upsert? Thanks for your support and your amazing work.

@fnc12
Copy link
Owner

fnc12 commented Nov 18, 2021

it is fixed in dev. Please use dev branch

@jairoareyes
Copy link
Author

dev branch shows this error: sqlite_orm/sqlite_orm.h:6776:28: error: ‘is_convertible_v’ is not a member of ‘std’ static_assert(std::is_convertible_v<typename T::value_type, const char*>,

@fnc12
Copy link
Owner

fnc12 commented Nov 18, 2021

what compiler do you use?

@jairoareyes
Copy link
Author

jairoareyes commented Nov 18, 2021

I'm using this: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
And cmake version 3.20.5

@fnc12
Copy link
Owner

fnc12 commented Nov 18, 2021

weird things: clang and vc++ works well. Let me fix it

@fnc12
Copy link
Owner

fnc12 commented Nov 18, 2021

fix is here. It will be merged into dev once CI builds are over with success

@jairoareyes
Copy link
Author

jairoareyes commented Nov 18, 2021

I'm trying the on_conflict but it throws an exception: near "ON": syntax error: SQL logic error. I just followed the example.

Does it need any special requirements? Which sqlite3 version do I need?

@fnc12
Copy link
Owner

fnc12 commented Nov 19, 2021

3.24.0 and higher as it told here https://www.sqlite.org/lang_conflict.html. Probably I need to add #ifdefs around on_conflict function to prevent events like this in future

@jairoareyes
Copy link
Author

I updated my sqlite3 version and it worked. Thanks for your kindly support!

@fnc12
Copy link
Owner

fnc12 commented Nov 19, 2021

Ok nice. I'll add #ifdef SQLITE_VERSION_NUMBER >= 3024000 anyway to prevent such errors in future

@juno12560
Copy link

juno12560 commented Nov 23, 2021

hi, with dev branch, unit_tests fails,
/Users/lishenglong/Code/sqlite_orm/tests/pragma_tests.cpp:38: FAILED:
REQUIRE( jm == decltype(jm)::OFF )
with expansion:
3 == 5

btw when will the stable version be released?

@fnc12
Copy link
Owner

fnc12 commented Nov 23, 2021

Hi. Looks like journal mode is altered inside a database file in your file system. Check out that file using other SQLite clients. Filename is journal_mode.sqlite

@juno12560
Copy link

journal_mode.sqlite was an empty file, I cleared the build dir and recompile again, the issue remains.

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

No branches or pull requests

3 participants