映射是Elixir键值(在其他语言中也称为字典或哈希)类型。您使用以下%w{}语法创建映射:
%{} // 创建一个空的映射 %{:a => 1, :b => 2} // 创建一个非空的映射
键和值可以使用任何类型:
%{"a" => 1, "b" => 2} %{1 => "a", 2 => "b"}
而且,您可以为键和值的混合类型的映射设置“:
// 键是整数或字符串 %{1 => "a", "b" => :foo} // 值是字符串或零 %{1 => "a", 2 => nil}
当映射中的所有键都是原子时,为了方便起见,可以使用关键字语法:
%{a: 1, b: 2}
Elixir是基于python界有名的ORM库SQLAlchemy做的封装。而且是轻量级的封装,它提供了更简单的方式来创建Python类并直接映射到关系数据库表(即通常所说的Active Record设计模式),类似于Django中的ORM。 示例: class Person(Entity): name = Field(String(128)) addresses = OneToMan
Table of Contents Elixir plugin IDEs Features Project From Existing Sources Import project from external model Create project from existing sources New Project Structure Project Settings Module Settin
�� Timber - Great Elixir Logging Made Easy Timber.io is a hosted service for aggregating logs across your entire stack -any language,any platform,any data source. Unlike traditional logging tools, Tim
This repository is the stable base upon which we build our Elixir projects at Mirego. We want to share it with the world so you can build awesome Elixir applications too. Introduction To learn more ab
CURRENTLY NOT COMPATIBLE TO THE AETERNITY NETWORK This implementation aims to be a aims to be a full node that complies with the aeternity specification, in the current state this is not ready yet and
Elixir-Slack This is a Slack Real Time Messaging API client for Elixir. You'll need aSlack API token which can be retrieved by following the Token GenerationInstructions or by creating anew bot integr