0
iex(6)> :mnesia.table_info(:users, :attributes)
[:id, :email, :foo, :inserted_at, :updated_at]
iex(7)> :mnesia.table_info(:users, :index)
[3]
iex(8)> :mnesia.add_table_index(:users, :email)
{:aborted, {:already_exists, :users, 3}}
我得知Tab
是第一個索引,但爲什麼不是2
而不是3索引?索引1是基於而不是零,還是在其他地方玩?爲什麼我的mnesia索引在這個位置?
好酷,所以erlang元組使用1基礎索引,謝謝 – blu