I was testing and seeing what happens if the android create a database with wrong input values.
For example, if I inadvertently typed NOOT instead of NOT or INTEGET instead of INTEGER, I expected SQL to point to a return error saying that the SQL key words were incorrect. Or at least that the input is invalid.
But that's not what happens. See this snippet:
sqlite> CREATE TABLE asd (_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, breed TEXT NOT NULL, gender INTEGET NOT NULL DEFAULT 0, weight INTEGER NOT NULL DEFAULT 0);
sqlite> .schema asd
CREATE TABLE asd (_id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, breed TEXT NOT NULL, gender INTEGET NOT NULL DEFAULT 0, weight INTEGER NOT NULL DEFAULT 0);
sqlite>
See what gender I purposely inserted the data type as INTEGET instead of INTEGER and apparently SQL accepted.
Another example:
CREATE TABLE qwe (_id INTEGET PRIMARY KEY);
sqlite> INSERT INTO qwe (_ID) VALUES (0);
sqlite> .header on
sqlite> .mode column
sqlite> SELECT * FROM qwe;
_id
----------
0
sqlite>
See that once again, instead of using INTEGER I put INTEGET and SQL does not report error. It adds information, even though it is, in my view, an invalid data type.
My question is, if SQL handles entries with errors, how can I check if my database is valid when creating applications?