You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.
Trying cockroachdb on 2.1 beta (v2.1.0-beta.20181015):
Cannot create a database automatically, but can migrate with ecto.migrate (expected)
Getting list of tags fails
Replaced query with:
deflist_tagsdoEcto.Adapters.SQL.query!(Repo,"select count(*) as tag_count, ut.tag from articles, (select unnest(tag_list) from articles) as ut(tag) group by ut.tag order by tag_count desc limit 5;").rows|>Enum.map(fnv->Enum.at(v,1)end)end
The text was updated successfully, but these errors were encountered:
def filter_by_tags(query, tag) do
query
|> join(:inner, [a], p in fragment(
"""
WITH articles AS( SELECT a.id, unnest(a.tag_list) tag FROM articles a ORDER BY a.id, a.created_at) select * from articles
"""), a.id == p.id)
|> where([a], fragment("tag = ?", ^tag))
end
Trying cockroachdb on 2.1 beta (v2.1.0-beta.20181015):
Replaced query with:
The text was updated successfully, but these errors were encountered: