-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Basically this code errors at compile-time, and I don't know why:
let categoryName = "Cars"
let s = query:
select product(name, img, price)
join prod_cat(prod, cat) on product.id == prod_cat.prod
join category(name) on category.id == prod_cat.cat
where category.name == ?categoryName # cannot infer the type of the placeholder
This is the sqlite model:
create table product(
id integer primary key,
name varchar not null,
img varchar not null,
price integer not null,
views integer not null default 0,
created timestamp not null default (DATETIME('now')),
modified timestamp not null default (DATETIME('now')));
create table category(
id integer primary key,
name varchar not null,
img varchar not null);
create table prod_cat(
prod integer not null references product(id),
cat integer not null references category(id));
Metadata
Metadata
Assignees
Labels
No labels