https://hexdocs.pm/ecto/getting-started.html (Ecto v2.0.5) の翻訳になります。 訳が間違っている、抜けているなどの箇所などを見つけたら指摘していただけると助かります。 Getting Started このガイドはElixirのデータベースラッパー及びクエリジェネレータEctoへのイントロダクションです。Ectoは、Elixirデベロッパーがどんなデータベースを使っていようと同じような方法でクエリによる問い合わせができるように、標準化されたAPIと抽象化された方法を提供しています。 このガイドでは、PostgreSQLデータベースのレコードの作成・読み込み・更新・削除のような基本的なことについて学べます。もしこのガイド中のコードを見たければ、ここ(at ecto/examples/friends on GitHub)のコードを見てくだ
This post belongs to the Phoenix and Elm, a real use case series. Introduction to creating a SPA with Phoenix and Elm Rendering the initial contact list Adding full text search and pagination navigation to the contact list Better state with union types, search resetting and keyed nodes. Implementing Elm routing Poenix and Elm communication through WebSockets Live demo | Source code IntroductionIt
Since PostgreSQL 9.2 we have the ability to store and query range of values with specific operators and functions. This is a super nice feature that removes complexity when handling logic around two pieces of information that can also be representing a third one. Let's say that we have a model that has price_range as one of its attributes. Instead of handling two fields like minimum_price and maxi
Functions within PostgreSQL can be setup to return rows and included in queries just like any other table. Continuing with our theme of trying to push Elixir and Phoenix a little on this site rebuild, we will move our site search inside of a database function and experiment with different ways to call it from Ecto. In our last article I skimmed over the details of setting up PostgreSQL search with
I've just started working Elixir & Phoenix today, i am trying to add Ecto as a mapper, but i'm having some trouble using time. This is my model. schema "users" do field :name, :string field :email, :string field :created_at, :datetime, default: Ecto.DateTime.local field :updated_at, :datetime, default: Ecto.DateTime.local end I'm trying to set the created_at and updated_at per default, but when i
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く