Interesting project - I'm trying to port the https://github.com/dbcli/pgspecial/blob/main/pgspecial/dbcommands.py python module to elixir using it to get a better feel. But I'm hitting some walls and I wonder if this can be solved or should I just move to ecto ?
it's may be somewhat connected to #7
let's say I define the same function twice with different params:
-- name: foo
select * from bar
--- name: foo
select * from bar where baz = :baz
knowing this definitions the code can generate something like:
def name(%{baz: baz}), do: "select * from bar where baz = #{baz}"
def name(%{}), do: "select * from bar"
The crucial part may be the map instead of keyword list because it will work with multiple arguments without caring for the order
In the dbcommands.py file I linked the functions accept 2 params: pattern and verbose
Knowing that we can generate 4 queries with 4 heads all with the same name:
Interesting project - I'm trying to port the https://github.com/dbcli/pgspecial/blob/main/pgspecial/dbcommands.py python module to elixir using it to get a better feel. But I'm hitting some walls and I wonder if this can be solved or should I just move to ecto ? it's may be somewhat connected to #7 let's say I define the same function twice with different params:
knowing this definitions the code can generate something like:
The crucial part may be the map instead of keyword list because it will work with multiple arguments without caring for the order
In the dbcommands.py file I linked the functions accept 2 params:
pattern
andverbose
Knowing that we can generate 4 queries with 4 heads all with the same name: