XEts.match

You're seeing just the function match, go back to XEts module for more information.
Link to this function

match(continuation)

Specs

match(any()) :: any()
Link to this function

match(tab, pattern)

Specs

match(t(), any()) :: any()
match(tab(), any()) :: any()

Match an item in the table.

Examples

iex> tab = XEts.new(:table) |> XEts.insert(x: 1, y: 2)
iex> XEts.match(tab, :"$1")
[[y: 2], [x: 1]]

iex> %{tab: tab} = XEts.new(:table) |> XEts.insert({{:item, 1}, 2})
iex> XEts.match(tab, {{:item, :"$1"}, :"$2"})
[[1, 2]]
Link to this function

match(tab, pattern, limit_or_meta)

Specs

match(t(), any(), any()) :: any()
match(tab(), any(), any()) :: any()

Match an item in the table.

Examples

iex> tab = XEts.new(:table) |> XEts.insert(x: 1, y: 2)
iex> XEts.match(tab, :"$1", XEts.get_meta(tab))
[[y: 2], [x: 1]]

iex> %{tab: tab} = XEts.new(:table1) |> XEts.insert(x: 1, y: 2, z: 3)
iex> XEts.match(tab, {:"$1", :"$2"}, 2) |> elem(0)
[[:y, 2], [:z, 3]]
Link to this function

match(tab, pattern, limit, meta)

Specs

match(t(), any(), any(), any()) :: any()
match(tab(), any(), any(), any()) :: any()

Match an item in the table given metadata and limit.

Examples

iex> tab = XEts.new(:table) |> XEts.insert(x: 1, y: 2)
iex> XEts.match(tab, :"$1", 2, XEts.get_meta(tab)) |> elem(0)
[[x: 1], [y: 2]]

iex> %{tab: tab} = XEts.new(:table1) |> XEts.insert(x: 1, y: 2, z: 3)
iex> XEts.match(tab, {:"$1", :"$2"}, 2, XEts.get_meta(tab)) |> elem(0)
[[:y, 2], [:z, 3]]