This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Monomorphic wrapper for polymorphic value | |
wrapper = { | |
type, | |
value | |
} | |
// CheckMap wrapper for .type lookup monomorphic | |
if (wrapper.type === 1) { | |
// CheckMap value for .somefield lookup monomorphic because in branch for one type | |
wrapper.value.somefield |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyBlog.Repo.Migrations.CreatePost do | |
use Ecto.Migration | |
def change do | |
create table(:posts, primary_key: false) do | |
add :id, :uuid, primary_key: true | |
add :body, :string | |
add :word_count, :integer | |
timestamps |