# \#query

**URL:** https://forum.elixirforum.com/tag/query/626.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [RFC 10008 - HTTP QUERY method: any plans for Plug/Cowboy support?](https://forum.elixirforum.com/t/rfc-10008-http-query-method-any-plans-for-plug-cowboy-support/75949)

<div class="topic-metadata">

**Author:** [@nseaSeb](https://forum.elixirforum.com/u/nseaSeb)\
**Replies:** 5\
**Last updated:** [July 9, 2026, 10:34am UTC](https://forum.elixirforum.com/t/rfc-10008-http-query-method-any-plans-for-plug-cowboy-support/75949 "2026-07-09T10:34:49Z")

</div>

The IETF published RFC 10008 in June 2026, standardizing a new HTTP method: QUERY. It’s meant to fill the gap between GET (safe/idempotent, but no defined body semantics) and POST (body support, but no safety guarantee) …

---

## [Creating a BEP3 compatible percent encoder (URI encoder)](https://forum.elixirforum.com/t/creating-a-bep3-compatible-percent-encoder-uri-encoder/69136)

<div class="topic-metadata">

**Author:** [@cgrimmett](https://forum.elixirforum.com/u/cgrimmett)\
**Replies:** 3\
**Last updated:** [February 2, 2025, 8:16am UTC](https://forum.elixirforum.com/t/creating-a-bep3-compatible-percent-encoder-uri-encoder/69136 "2025-02-02T08:16:54Z")

</div>

I would like to announce torrents to my opentracker using an Elixir program. I have a test qbittorrent and opentracker running and I’ve identified how qbittorrent sends it’s announces to opentracker. METHOD: GET URL htt…

---

## [Qry - Query your domain](https://forum.elixirforum.com/t/qry-query-your-domain/60428)

<div class="topic-metadata">

**Author:** [@austinthecoder](https://forum.elixirforum.com/u/austinthecoder)\
**Replies:** 6\
**Last updated:** [December 22, 2023, 12:13am UTC](https://forum.elixirforum.com/t/qry-query-your-domain/60428 "2023-12-22T00:13:59Z")

</div>

I created a project named Qry that allows you to query your domain with a nice syntax, returning results as nested maps – a concept similar to GraphQL or Ecto’s preload. This is a personal need, but wanted to share it i…

---

## [ExtractQueryParams - A simple elixir package for transforming keyword lists to SQL statements](https://forum.elixirforum.com/t/extractqueryparams-a-simple-elixir-package-for-transforming-keyword-lists-to-sql-statements/60122)

<div class="topic-metadata">

**Author:** [@PsychicPlatypus](https://forum.elixirforum.com/u/PsychicPlatypus)\
**Replies:** 3\
**Last updated:** [December 4, 2023, 3:44pm UTC](https://forum.elixirforum.com/t/extractqueryparams-a-simple-elixir-package-for-transforming-keyword-lists-to-sql-statements/60122 "2023-12-04T15:44:57Z")

</div>

Link to HexDocs Page Motivation I was building a toy rest-api using plug-cowboy and wanted a way to turn query parameters such as name: "Bob, age: 15 into sql statements such as: Depo.read("SELECT \* FROM customers WHER…

---

## [LiveQuery - A new way to load data for your live views](https://forum.elixirforum.com/t/livequery-a-new-way-to-load-data-for-your-live-views/54777)

<div class="topic-metadata">

**Author:** [@AHBruns](https://forum.elixirforum.com/u/AHBruns)\
**Replies:** 13\
**Last updated:** [July 25, 2023, 7:23pm UTC](https://forum.elixirforum.com/t/livequery-a-new-way-to-load-data-for-your-live-views/54777 "2023-07-25T19:23:02Z")

</div>

Introduction I’ve begun work on a library I think will dramatically change (and, I hope, improve) how data is loaded in live views. I wanted to get this post up now to facilitate early design feedback. The Problem As I …

---

## [Package for sorting ecto query](https://forum.elixirforum.com/t/package-for-sorting-ecto-query/51586)

<div class="topic-metadata">

**Author:** [@senconscious](https://forum.elixirforum.com/u/senconscious)\
**Replies:** 2\
**Last updated:** [November 19, 2022, 10:31pm UTC](https://forum.elixirforum.com/t/package-for-sorting-ecto-query/51586 "2022-11-19T22:31:33Z")

</div>

EctoJuno is a package that provides parsing, validation and applying sorting parameters for your ecto queries on models. Currently sorting by joint query is not implemented, as well as custom validators for your paramete…

---

## [Query in preload produces different result than by itself](https://forum.elixirforum.com/t/query-in-preload-produces-different-result-than-by-itself/47166)

<div class="topic-metadata">

**Author:** [@benonymus](https://forum.elixirforum.com/u/benonymus)\
**Replies:** 4\
**Last updated:** [April 12, 2022, 1:40pm UTC](https://forum.elixirforum.com/t/query-in-preload-produces-different-result-than-by-itself/47166 "2022-04-12T13:40:17Z")

</div>

Hey I have a users - teams many to many setup through a users\_teams table. In the team schema I have the following fields mapping to the users: has\_many :active\_users\_teams, UserTeam has\_many :active\_users, th…

---

## [Mnesia index reversing the order of records](https://forum.elixirforum.com/t/mnesia-index-reversing-the-order-of-records/46623)

<div class="topic-metadata">

**Author:** [@rogerweb](https://forum.elixirforum.com/u/rogerweb)\
**Replies:** 0\
**Last updated:** [March 16, 2022, 6:03pm UTC](https://forum.elixirforum.com/t/mnesia-index-reversing-the-order-of-records/46623 "2022-03-16T18:03:54Z")

</div>

Hi, I have an ordered\_set in Mnesia where the records look like this: :request\_id, # String, the primary key :campaign\_id, # String, used often for filtering :call\_id, # String The following function returns t…

---

## [Repo.aggregate(queryable, :count, :id) vs select(count: element.id)](https://forum.elixirforum.com/t/repo-aggregate-queryable-count-id-vs-select-count-element-id/46449)

<div class="topic-metadata">

**Author:** [@Samuel-88](https://forum.elixirforum.com/u/Samuel-88)\
**Replies:** 4\
**Last updated:** [March 8, 2022, 4:55pm UTC](https://forum.elixirforum.com/t/repo-aggregate-queryable-count-id-vs-select-count-element-id/46449 "2022-03-08T16:55:23Z")

</div>

Hello all, I hope everyone is doing all right! A very common task for me is to count the number of entries that match certain criterias. And I usualy do so by doing the following: from(o in Organization, join: w in…

---

## [What is the best way to load two different queries? (Elixir Task? Or etc.)](https://forum.elixirforum.com/t/what-is-the-best-way-to-load-two-different-queries-elixir-task-or-etc/42938)

<div class="topic-metadata">

**Author:** [@shahryarjb](https://forum.elixirforum.com/u/shahryarjb)\
**Replies:** 3\
**Last updated:** [October 7, 2021, 5:38pm UTC](https://forum.elixirforum.com/t/what-is-the-best-way-to-load-two-different-queries-elixir-task-or-etc/42938 "2021-10-07T17:38:07Z")

</div>

Hi, I have a notification part on my project which has 2 schema tables: notifs = notifications is sent by system or moderator users user\_notif\_status = read or skipped notifications of user. Imagine in this forum you …

---

## [Querying json objects](https://forum.elixirforum.com/t/querying-json-objects/26618)

<div class="topic-metadata">

**Author:** [@jos](https://forum.elixirforum.com/u/jos)\
**Replies:** 6\
**Last updated:** [December 21, 2019, 12:43pm UTC](https://forum.elixirforum.com/t/querying-json-objects/26618 "2019-12-21T12:43:24Z")

</div>

I’m looking for a way to query specific values from a json api response’s. a bit xpath like query language. I was thinking, transform the json to xml, run the xpath’s and return the results. :grimacing: is there a sui…

---

## [How to add external variable to fragment?](https://forum.elixirforum.com/t/how-to-add-external-variable-to-fragment/25685)

<div class="topic-metadata">

**Author:** [@voger](https://forum.elixirforum.com/u/voger)\
**Replies:** 2\
**Last updated:** [September 26, 2019, 7:58pm UTC](https://forum.elixirforum.com/t/how-to-add-external-variable-to-fragment/25685 "2019-09-26T19:58:06Z")

</div>

I have read many topics and pages about this issue and while it seems this should work I am probably missing something. I have this query from(v in Visit, right\_join: day in fragment( …

---

## [Wrong group query when trying to build dynamically](https://forum.elixirforum.com/t/wrong-group-query-when-trying-to-build-dynamically/21678)

<div class="topic-metadata">

**Author:** [@tanweerdev](https://forum.elixirforum.com/u/tanweerdev)\
**Replies:** 3\
**Last updated:** [April 18, 2019, 2:01pm UTC](https://forum.elixirforum.com/t/wrong-group-query-when-trying-to-build-dynamically/21678 "2019-04-18T14:01:25Z")

</div>

I am trying to working on a query builder and the example/content is just imaginary. query = from en in Data.InfectionRevision query = from q in query, select: map(q, \[:is\_complete, :is\_active\]) query = from(q in query…

---

## [Why I am getting same ids/resources returned when try to preload has\_many relation](https://forum.elixirforum.com/t/why-i-am-getting-same-ids-resources-returned-when-try-to-preload-has-many-relation/21641)

<div class="topic-metadata">

**Author:** [@tanweerdev](https://forum.elixirforum.com/u/tanweerdev)\
**Replies:** 12\
**Last updated:** [April 16, 2019, 7:25am UTC](https://forum.elixirforum.com/t/why-i-am-getting-same-ids-resources-returned-when-try-to-preload-has-many-relation/21641 "2019-04-16T07:25:11Z")

</div>

I have this query #Ecto.Query\<from i0 in HaiData.Infection, left\_join: e1 in assoc(i0, :encounter), left\_join: f2 in assoc(i0, :facility), left\_join: r3 in assoc(i0, :revisions), order\_by: \[asc: i0.id\], limit: ^10, o…

---

## [Limit or killing ecto fetch records operation](https://forum.elixirforum.com/t/limit-or-killing-ecto-fetch-records-operation/21430)

<div class="topic-metadata">

**Author:** [@tanweerdev](https://forum.elixirforum.com/u/tanweerdev)\
**Replies:** 2\
**Last updated:** [April 5, 2019, 6:12pm UTC](https://forum.elixirforum.com/t/limit-or-killing-ecto-fetch-records-operation/21430 "2019-04-05T18:12:31Z")

</div>

I am running long queries(ecto version \> 3) based on users params but I want to kill the query if query takes longer than 10 seconds and return error response. One way I find (if I understand it correctly) is to set-sta…

---

## [Help needed translating this SQL query to Ecto Query (join and aggregation)](https://forum.elixirforum.com/t/help-needed-translating-this-sql-query-to-ecto-query-join-and-aggregation/14328)

<div class="topic-metadata">

**Author:** [@acrolink](https://forum.elixirforum.com/u/acrolink)\
**Replies:** 2\
**Last updated:** [May 23, 2018, 8:48pm UTC](https://forum.elixirforum.com/t/help-needed-translating-this-sql-query-to-ecto-query-join-and-aggregation/14328 "2018-05-23T20:48:10Z")

</div>

I have this SQL query which returns also rows for books who have no records at all: select max(r.id) as record\_id, b.id as book\_id, r.due\_for\_return, r.returned\_at FROM books b left join records r on b.id = r.book\_id gr…

---

## [How to write this dynamically inside an Ecto Query](https://forum.elixirforum.com/t/how-to-write-this-dynamically-inside-an-ecto-query/14334)

<div class="topic-metadata">

**Author:** [@acrolink](https://forum.elixirforum.com/u/acrolink)\
**Replies:** 1\
**Last updated:** [May 23, 2018, 4:12pm UTC](https://forum.elixirforum.com/t/how-to-write-this-dynamically-inside-an-ecto-query/14334 "2018-05-23T16:12:01Z")

</div>

I have this Ecto Query: books = (from books in Mango.Books.Book, left\_join: records in assoc(books, :records), where: books.institute\_id == ^claims\["institute\_id"\], where: not is\_nil(records.r…

---

## [Ecto.Query need help writing a query with expressions and dynamic queries](https://forum.elixirforum.com/t/ecto-query-need-help-writing-a-query-with-expressions-and-dynamic-queries/14256)

<div class="topic-metadata">

**Author:** [@tankh7](https://forum.elixirforum.com/u/tankh7)\
**Replies:** 5\
**Last updated:** [May 18, 2018, 3:36pm UTC](https://forum.elixirforum.com/t/ecto-query-need-help-writing-a-query-with-expressions-and-dynamic-queries/14256 "2018-05-18T15:36:55Z")

</div>

I’m writing a query to filter out payments. We can filter on payment name, status, date from, date to, amount from, and amount to. I’ve gotten the queries working for all but amount from and amount to, as they are a bit …

---

## [Ecto join and order\_by with dynamic values](https://forum.elixirforum.com/t/ecto-join-and-order-by-with-dynamic-values/14209)

<div class="topic-metadata">

**Author:** [@TheYuwana](https://forum.elixirforum.com/u/TheYuwana)\
**Replies:** 6\
**Last updated:** [May 16, 2018, 2:45pm UTC](https://forum.elixirforum.com/t/ecto-join-and-order-by-with-dynamic-values/14209 "2018-05-16T14:45:39Z")

</div>

Hey fellow Elixirians! I am having trouble with joining and ordering, but with dynamic values. So basically I send a dynamic “asc” or “desc” and a dynamic field to the function and it needs to order according to whats g…

---

## [Append fields using select query on Ecto](https://forum.elixirforum.com/t/append-fields-using-select-query-on-ecto/14203)

<div class="topic-metadata">

**Author:** [@nallwhy](https://forum.elixirforum.com/u/nallwhy)\
**Replies:** 1\
**Last updated:** [May 15, 2018, 5:44am UTC](https://forum.elixirforum.com/t/append-fields-using-select-query-on-ecto/14203 "2018-05-15T05:44:28Z")

</div>

I have a schema and it has many fields and one belongs\_to association. I want to query this model with one field of associated model like below. def MyModel do schema "my\_models" do field(:field0, :string) fi…

---

## [Ecto Time Query Only For Hour](https://forum.elixirforum.com/t/ecto-time-query-only-for-hour/14176)

<div class="topic-metadata">

**Author:** [@dokuzbir](https://forum.elixirforum.com/u/dokuzbir)\
**Replies:** 11\
**Last updated:** [May 12, 2018, 7:41pm UTC](https://forum.elixirforum.com/t/ecto-time-query-only-for-hour/14176 "2018-05-12T19:41:01Z")

</div>

I want fetch time datas without specify minutes . So with one query, can i fetch these two times time: ~T\[21:30:00\] and time: ~T\[21:15:00\] ?
