I have read the solution code too and i don’t understand the logic behind some of it, as for as I know, this hasn’t been explained in the course either and I haven’t found my answers on google.
More specifically, i struggle with code like this:
db.run('CREATE TABLE IF NOT EXISTS `Employee` ( ' + '`id` INTEGER NOT NULL, ' + '`name` TEXT NOT NULL, ' + '`position` TEXT NOT NULL, ' + '`wage` INTEGER NOT NULL, ' + '`is_current_employee` INTEGER NOT NULL DEFAULT 1, ' + 'PRIMARY KEY(`id`) )');
I understand from google that variables like Employee(your table name) need to be between backticks, what I don’t get is the part behind that.
The column names and datatypes look incredible messy with a lot of backticks, regular brackets and for some reason plus signs, trying to write it differently results in me getting a lot of error messages.
So I would be happy to hear why it’s written like that.
Thanks in advance.