User: Admin: Difference between revisions
From ElixirBlocks
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
query = from "artists", select:[:name] | query = from "artists", select:[:name] | ||
'''Verbose:''' | |||
Ecto.Query.from("artists", select[:name]) | |||
Repo.all(query) | Repo.all(query) | ||
#=> [%{name: "Miles Davis"}, %{name: "Bill Evans"}] | #=> [%{name: "Miles Davis"}, %{name: "Bill Evans"}] | ||
Repo.to_sql(:all, query) | Repo.to_sql(:all, query) |
Revision as of 12:40, 3 April 2023
- How to Create Database Seed Data.
- How to Work with Database Data via Basic Commands and Custom Change sets.
- How to Render Database Data to LiveView (via Context Commands).
- How to Create a Chat using PubSub.
- How to Create Event Handlers in LiveView
- How to Create a Dynamic Route from Scratch.
- How to Use Elixirs Template language
- How to Work with Modal
- How to Use CSS From Scratch (Without bundler)
- How to use JS hooks
__________________________________________________
ECTO
query = from "artists", select:[:name]
Verbose:
Ecto.Query.from("artists", select[:name])
Repo.all(query)
- => [%{name: "Miles Davis"}, %{name: "Bill Evans"}]
Repo.to_sql(:all, query)