QxEntityEditor SQLite default values

Forum for posting problems using QxEntityEditor

QxEntityEditor SQLite default values

Postby mdw » Tue Jun 20, 2017 7:37 am

I have a SQLite DB project with the import option Import columns default value enabled. This is usually fine, but I have also timestamp columns with default value CURRENT_TIMESTAMP. Although perfectly valid in SQL, it makes not sense in the entity schema and far less in the generated C++ code, which does not compile.
For now I always cancel such special default values after doing the import. Does there exist some better alternative to ignore such "functional" default values?
mdw
 
Posts: 34
Joined: Mon Feb 15, 2016 2:45 pm

Re: QxEntityEditor SQLite default values

Postby qxorm » Wed Jun 21, 2017 8:19 am

Hello,

I don't know what is the best way to manage that, but you could :
- Execute a custom script after your import process to remove these values (a *.qxee project file is just a SQLite database) : https://www.qxorm.com/qxorm_en/manual_q ... gin_script
- Or manage these values during the C++ export process in a javascript file (to be sure that your C++ code compiles fine) : https://www.qxorm.com/qxorm_en/manual_q ... #js_engine
- Or create a macro in your C++ code, something like that :
Code: Select all
#define CURRENT_TIMESTAMP QDateTime::currentDateTime()
qxorm
Site Admin
 
Posts: 483
Joined: Mon Apr 12, 2010 7:45 am


Return to QxEntityEditor - Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron