Skip to content

Instantly share code, notes, and snippets.

@BruceBC
BruceBC / convert_raw_sql_to_map_using_ecto.exs
Created July 12, 2023 15:34
Convenience script to convert raw sql given to ecto into a usable map
# Remember to add `ecto` to your list of deps in `mix.exs`
import Ecto.Query
# Replace `MyApp` with the name of the your app
alias MyApp.Repo
# Replace with your own raw sql query
query = """
SELECT * FROM table;
"""

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example