Compare commits
No commits in common. "b43637ab8a31a1aaa82393bb3a271a1a56dd6e4a" and "a5ee6313d6d7f1908871708c4b8103a4821c1984" have entirely different histories.
b43637ab8a
...
a5ee6313d6
|
@ -233,14 +233,14 @@ export default {
|
||||||
items = db`
|
items = db`
|
||||||
select *
|
select *
|
||||||
from "items"
|
from "items"
|
||||||
${ tag
|
${tag
|
||||||
? db`
|
? db`
|
||||||
inner join (
|
inner join (
|
||||||
select "tags_assign".item_id, "tags_assign".tag_id, "tags".tag
|
select "tags_assign".item_id, "tags".tag
|
||||||
from "tags"
|
from "tags"
|
||||||
left join "tags_assign" on "tags_assign".tag_id = "tags".id
|
left join "tags_assign" on "tags_assign".tag_id = "tags".id
|
||||||
where "tags".tag ilike ${'%' + tag + '%'}
|
where "tags".tag ilike ${'%' + tag + '%'}
|
||||||
group by "tags_assign".item_id, "tags_assign".tag_id, "tags".tag
|
group by "tags_assign".item_id, "tags".tag
|
||||||
) as st on st.item_id = "items".id`
|
) as st on st.item_id = "items".id`
|
||||||
: db``
|
: db``
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ export default {
|
||||||
: db``
|
: db``
|
||||||
}
|
}
|
||||||
${ tag
|
${ tag
|
||||||
? db`group by st.item_id, "items".id, st.tag, st.tag_id`
|
? db`group by st.item_id, "items".id, "tags_assign".tag_id`
|
||||||
: db`group by "items".id`
|
: db`group by "items".id`
|
||||||
}
|
}
|
||||||
order by "items".id desc
|
order by "items".id desc
|
||||||
|
|
Loading…
Reference in New Issue
Block a user