Resolved!
Problem was in database initialization, journal mode and synchronous mode must be set outside of transactions.
Happy coding😀
Post
Replies
Boosts
Views
Activity
Yes!
I changed the code:
sqlite3_bind_text(insertStatement, sqlite3_bind_parameter_index(insertStatement, ":name"), name, -1, SQLITE_TRANSIENT)
and added:
let SQLITE_TRANSIENT = unsafeBitCast(-1, to: sqlite3_destructor_type.self)
Thank you!
1.The problem is in the "insert" it is visible in the console, because the ViewController sends the correct data to the DatabaseManager , which it prints in the console and then saves before saving to the table. But in the database it saves wrong as you can see in the screenshot.
2.I don't understand the question, what should I use?