access() = public | protected | private
type() = set | ordered_set | bag | duplicate_bag
set 默认类型,一个键对应一个对象,对象之间是无序的。
ordered_set 一个键对应一个对象, key整数1和浮点数1.0是相同的。
bag 一个键可以对应多个对象,但每个对象只能对应一个键。
duplicate_bag 一个键可对应多个对象,每个对象也可以对应多个键。
protected 是默认的, 只有所属进程能写,其他进程只能读。
it will not automatically be destroyed unless the owner process terminates.
The default owner is the process that created the table. Table ownership can be transferred at process termination by using the heir option or explicitly by calling give_away/3.
All updates to single objects are guaranteed to be both atomic and isolated.
new(Name, Options) -> tid() | atom()
Name = atom()
Options = [Option]
Option = Type
| Access
| named_table
| {keypos, Pos}
| {heir, Pid :: pid(), HeirData}
| {heir, none}
| Tweaks
// Creates a new table and returns a table identifier which can be used in subsequent operations.
info(Tab) -> InfoList | undefined
// Returns information about the table Tab as a list of tuples.
delete(Tab) -> true
// Deletes the entire table Tab.
delete_all_objects(Tab) -> true
// Delete all objects in the ETS table Tab. The operation is guaranteed to be atomic and isolated.
delete(Tab, Key) -> true
// Deletes all objects with the key Key from the table Tab.
insert(Tab, ObjectOrObjects) -> true
ObjectOrObjects = tuple() | [tuple()]
// Inserts the object or all of the objects in the list ObjectOrObjects into the table Tab. If the table is a set and the key of the inserted objects matches the key of any object in the table, the old object will be replaced.
The entire operation is guaranteed to be atomic and isolated, even when a list of objects is inserted.
insert_new(Tab, ObjectOrObjects) -> boolean()
// 当key不存在才会插入,即不会覆盖旧项
lookup(Tab, Key) -> [Object]
// Returns a list of all objects with the key Key in the table Tab.
first(Tab) -> Key | '$end_of_table'
// Returns the first key Key in the table Tab. If the table is empty, '$end_of_table' will be returned.
tab2file(Tab, Filename) -> ok | {error, Reason}
Filename = file:name()
// Dumps the table Tab to the file Filename.
file2tab(Filename) -> {ok, Tab} | {error, Reason}
Filename = file:name()
// Reads a file produced by tab2file/2 or tab2file/3 and creates the corresponding table Tab.
tab2list(Tab) -> [Object]
Object = tuple()
// Returns a list of all objects in the table Tab.
all() -> [Tab] // Returns a list of all tables at the node.
分享到:
相关推荐
永恒是监视ETS表以确保其永不消亡的简单方法。 它通过使用计划的监视和消息传递,使用反弹的GenServer来确保所有者和继承人始终可用。 这个想法与不朽库的想法类似,但是它可以进一步确保更防弹的解决方案-并不需要...
通讯录Bertconf 是一个简单的应用程序,它将转换磁盘上的 BERT(二进制 Erlang 术语格式)文件并在运行时将它们转换为 ETS 表。 如果/当文件发生变化时,这些文件会不断更新和自动重新加载。如何构建$ ./rebar ...
slg_csv提供csv文件到ets表的导入功能,你可以简单的指定配置关系来完成导入.启动slg_csv启动slg_csv使用以下代码:slg_csv:start()关闭slg_csv使用以下代码:slg_csv:stop()启动之后没有加载配置文件,你需要自定义你...
碎片:Erlang和Elixir的分区ETS表
etso:Ecto 3适配器允许使用ETS表中保存的Ecto模式
KNX编程软件 ETS5 v5.7.5
Ets5 V5.5.4简体中文版下载。Ets5 V5.5.4简体中文版下载。Ets5 V5.5.4简体中文版下载。Ets5 V5.5.4简体中文版下载。
ETS300/ETS364测试机的手册,包括硬件的详细介绍,软件系统介绍,测试程序开发等等 总共26个PDF文件。
ETS5最新调试视频教程,一步步教你使用ETS5软件进行KNX设备的调试。
最新版的ETS5中文特别版老用户免费更新,解除设备数限制,无需使用加密狗;个人调试及小公司福利,终于不用几十个存档一个项目了;
EIB系统调试软件ETS的破解小插件,可以免费用ETS了!
ETS即工程工具软件;作为制造商独立的配置软件工具,适用于在KNX系统内设计和配置智能家居和楼宇控制安装项目. ETS软件仅对使用Windows系统的电脑适用. 仅在插入USB硬件锁时适用. 与Windows 10系统兼容
要使用一些示例上下文创建几个表,请运行以下命令: ets_ui_util:dummy_table().或者自己创建 ETS 表并在 ui 上玩耍动机在一个地方聚合来自多个 erlang 节点的结果。 基于 HTTP 的 ETS 查询能力。 TODO: 客户端模式...
ETS5 Professional 版本 5.7.6 附加备注 支持中文、支持云端产品数据库
ets5 knx 编程软件专业版,需要另行下载软件使用,没有数量的限制。 ETS5 Professional 版本 5.5.2
KNX_ETS5软件安装包
openharmony简易播放器ets版本
在这种方式下, 一般仪表 1 用来发送接收数据, 仪表 2做环回, 可以根 据需要做 2层环回(及将收到数据包的源 MAC 地址和目标 MAC 地址做交 换)或者 3层环回(将收到数据包的源 IP 地址和目标 IP 地址做交换, ...
ETS5 Professional 版本 5.7.4 发布日期 03/02/2020 附加备注 支持中文、支持云端产品数据库
2、ETS汽轮机危急遮断系统介绍 2.1 ETS保护的功能及必要性 2.2 ETS保护动作的触发条件 2.3 ETS保护动作的结果及对象 2.4 ETS保护的逻辑图 2.5 常见故障及处理(具体事例) 3、DEH 3.1 DEH控制系统控制系统主要...