function* BreakfastFoodsSchema() {
const id = yield PrimaryKey(Column("id", "INTEGER"));
const name = yield NotNull(Column("name", "TEXT"));
const healthyLevel = yield Column("healthyLevel", "INTEGER");
const imageData = yield Column("imageData", "BLOB");
return {id, name, healthyLevel, imageData};
}
CREATE TABLE IF NOT EXISTS breakfastFoods(
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
healthyLevel INTEGER,
imageData BLOB
);
INSERT INTO breakfastFoods(name, healthyLevel) VALUES (:name, :healthyLevel);