Closed aguilard07 closed 4 years ago
PRAGMA journal_mode = WAL
is not supported in this library. Please create new database without this command and try again.
Hello
PRAGMA foreign_keys = on
is supported by this lib? If it is so, how can I implement it? Because I'm having issues with it.
Foreign keys are supported. What problem are you facing?
I don't know how yo implement it.
After I execute the pragma foreign_keys = on
sentence all the queries end
un error and makes my ESP32 reboot.
El vie., 23 de ago. de 2019 13:47, Arun notifications@github.com escribió:
Foreign keys are supported. What problem are you facing?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/siara-cc/esp32_arduino_sqlite3_lib/issues/14?email_source=notifications&email_token=AMLWZJDROE3ZBIFOP7XU7ZDQGAPBZA5CNFSM4ILBTHUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5A4GVA#issuecomment-524403540, or mute the thread https://github.com/notifications/unsubscribe-auth/AMLWZJEWXHVIQHN73A3MV4LQGAPBZANCNFSM4ILBTHUA .
I am not sure where you are running the SQL statements. I thought you are creating the database using Desktop computer and running above code to display data.
In any case the above code should run and your use case is ok. The database may have got corrupted due to power problems. Please copy again and try.
Well, I'm doing these set of steps:
sqlite3_initialize()
pragma foreign_keys = on
I test it in my PC, and the constraints work.
Constraint checking is not enabled. Several features are disabled to avoid memory problems. This was adopted from the NodeMCU version of Sqlite.
I will check if constraint checking and some other features can be enabled without affecting memory in the next release. Meanwhile, please avoid bad inserts using your code.
By the way, for checking foreign key constraints, at least two tables are required. In the above schema, there is only one table?
I changed the schema a week ago, now I have around 6 tables. BTW, triggers and raise messages are supported? With raise messages I mean, how can I get them if I implement a trigger?
See new library https://github.com/siara-cc/sqlite_micro_logger_arduino. It overcomes all memory problems and corruption issues. However there are limitations.
Hello, I'm trying to use SPIFFS with a very little 3 row Database with the ESP32 Dev Module. My problem is that the sketch is succesfully opening the data base but no making the query.
Maybe I have an error when I make de .sql file. This is the schema:
And this is the Arduino Skecth
And finally, the OUTPUT msg: