guaxinim v0.1.2 Guaxinim.Database.ModuleReference
Link to this section Summary
Functions
Require the needed modules to use the table effectively
Add a copy of the table on the given node with the given mode
Add the index in the table for the given attribute
Read a record based on a slot, see mnesia:dirty_slot
The in order keyword list of attributes passed when the table was defined
Check if the table is a bag
Clear the content of the table
Change the copying mode of the table on the given node, see
mnesia:change_table_copy_type
Get the number of records in the table
Create the table with the given copying mode and inherent definition
Return the database the table belongs to
Delete the record or the given key from the table, see mnesia:delete
and mnesia:delete_object
Delete the record or the given key from the table with the given lock,
see mnesia:delete
and mnesia:delete_object
Delete the record or the given key from the table, see
mnesia:dirty_delete
and mnesia:dirty_delete_object
Delete a copy of the table from the given node
Delete the index in the table for the given attribute
Destroy the table
Destroy the table, raising if an error occurs
Return the first key or record in the table, see mnesia:first
Return the first key or record in the table, see mnesia:dirty_first
Fold the whole table from the left, see mnesia:foldl
Fold the whole table from the right, see mnesia:foldr
Force load the table
Get the name of the id key
Get information about the table, see mnesia:table_info
Return the key of the record
Return all the keys in the table, see mnesia:all_keys
Return all keys in the table, see mnesia:dirty_all_keys
Return the last key or record in the table, see mnesia:last
Return the last key or record in the table, see mnesia:dirty_last
Lock the table with the given lock
Change the table majority
Set master nodes for the table, see mnesia:set_master_nodes
Select records in the table using simple don’t care values, see
mnesia:match_object
Select records in the table using simple don’t care values, see
mnesia:dirty_match_object
Check if the key is present in the table
Change the access of the table, see mnesia:change_table_access_mode
Move a copy of the table from the given node to another given node
Return the next key or record in the table, see mnesia:next
Return the next key or record in the table, see mnesia:dirty_next
The options passed when the table was defined
Check if the table is an ordered set
Return the previous key or record in the table, see mnesia:prev
Return the previous key or record in the table, see mnesia:dirty_prev
Change the table loading priority
Return properties of the table
Read a record from the table with the given lock, see mnesia:read
Read a record from the table, see mnesia:dirty_read
Read records from the table based on a secondary index given as position,
see mnesia:index_read
Read records from the table based on a secondary index given as position,
see mnesia:dirty_index_read
Select records in the table using a match_spec, see mnesia:select
Select records in the given table using a match_spec passing a limit or a
lock kind, see mnesia:select
Select records in the given table using a match_spec passing a limit and a
lock kind, see mnesia:select
Select records in the table using a match_spec, see
mnesia:dirty_select
Check if the table is a set
Return an iterator to use with Enum functions
Return an iterator to use with the Enum functions using dirty operations to retrieve information
Return the type of the table
Wait for the table optionally with a timeout
Select records in the table using an Exquisite query, see
Exquisite.match/2
and mnesia:select
Select records in the table using an Exquisite query, see
Exquisite.match/2
and mnesia:dirty_select
Write the record to the table, see mnesia:write
Write the record to the table, see mnesia:dirty_write
Link to this section Types
Link to this section Functions
Require the needed modules to use the table effectively.
add_copy(node(), Amnesia.Table.cv()) :: Amnesia.Table.o()
Add a copy of the table on the given node with the given mode.
Add the index in the table for the given attribute.
Read a record based on a slot, see mnesia:dirty_slot
.
The in order keyword list of attributes passed when the table was defined.
Check if the table is a bag.
Clear the content of the table.
Change the copying mode of the table on the given node, see
mnesia:change_table_copy_type
.
Modes
:disk
sets:disc_copies
mode:disk!
sets:disc_only_copies
mode:memory
sets:ram_copies
mode
Get the number of records in the table.
Create the table with the given copying mode and inherent definition.
Return the database the table belongs to.
Delete the record or the given key from the table, see mnesia:delete
and mnesia:delete_object
.
Delete the record or the given key from the table with the given lock,
see mnesia:delete
and mnesia:delete_object
.
Locks
:write
sets a:write
lock:write!
sets a:sticky_write
lock
Delete the record or the given key from the table, see
mnesia:dirty_delete
and mnesia:dirty_delete_object
.
Delete a copy of the table from the given node.
Delete the index in the table for the given attribute.
Destroy the table.
Destroy the table, raising if an error occurs.
first(boolean(), atom()) :: any() | t() | nil | no_return()
Return the first key or record in the table, see mnesia:first
.
By default it returns the record, if you want only the key pass true as first parameter.
If the table is a bag, it will return a list of records.
Return the first key or record in the table, see mnesia:dirty_first
.
By default it returns the record, if you want only the key pass true as first parameter.
If the table is a bag, it will return a list of records.
Fold the whole table from the left, see mnesia:foldl
.
Fold the whole table from the right, see mnesia:foldr
.
Force load the table.
Get the name of the id key.
Get information about the table, see mnesia:table_info
.
Return the key of the record.
Return all the keys in the table, see mnesia:all_keys
.
Return all keys in the table, see mnesia:dirty_all_keys
.
last(boolean(), atom()) :: any() | t() | nil | no_return()
Return the last key or record in the table, see mnesia:last
.
By default it returns the record, if you want only the key pass true as first parameter.
If the table is a bag, it will return a list of records.
Return the last key or record in the table, see mnesia:dirty_last
.
By default it returns the record, if you want only the key pass true as first parameter.
If the table is a bag, it will return a list of records.
Lock the table with the given lock.
Locks
:write
sets a:write
lock:write!
sets a:sticky_write
lock:read
sets a:read
lock
Change the table majority.
Set master nodes for the table, see mnesia:set_master_nodes
.
match(:read | :write, any()) :: [t()] | nil | no_return()
Select records in the table using simple don’t care values, see
mnesia:match_object
.
Select records in the table using simple don’t care values, see
mnesia:dirty_match_object
.
Check if the key is present in the table.
Change the access of the table, see mnesia:change_table_access_mode
.
Modes
:both
sets read and write mode, it’s the default.:read!
sets read-only mode.
Move a copy of the table from the given node to another given node.
Return the next key or record in the table, see mnesia:next
.
If you’re calling this function from an instance of the table (a record in it), it will get you the next record, if you’re calling it directly on the module it will treat the argument as key to start from and return you the next key.
Return the next key or record in the table, see mnesia:dirty_next
.
If you’re calling this function from an instance of the table (a record in it), it will get you the next record, if you’re calling it directly on the module it will treat the argument as key to start from and return you the next key.
The options passed when the table was defined.
Check if the table is an ordered set.
Return the previous key or record in the table, see mnesia:prev
.
If you’re calling this function from an instance of the table (a record in it), it will get you the previous record, if you’re calling it directly on the module it will treat the argument as key to start from and return you the previous key.
Return the previous key or record in the table, see mnesia:dirty_prev
.
If you’re calling this function from an instance of the table (a record in it), it will get you the previous record, if you’re calling it directly on the module it will treat the argument as key to start from and return you the previous key.
Change the table loading priority.
Return properties of the table.
read(any(), :read | :write | :write!) :: t() | nil | no_return()
Read a record from the table with the given lock, see mnesia:read
.
Unlike mnesia:read
this returns either the record or nil.
Locks
:write
sets a:write
lock:write!
sets a:sticky_write
lock:read
sets a:read
lock
Read a record from the table, see mnesia:dirty_read
.
Unlike mnesia:dirty_read
this returns either the record or nil.
read_at(any(), integer() | atom()) :: [t()] | nil | no_return()
Read records from the table based on a secondary index given as position,
see mnesia:index_read
.
read_at!(any(), integer() | atom()) :: [t()] | nil | no_return()
Read records from the table based on a secondary index given as position,
see mnesia:dirty_index_read
.
Select records in the table using a match_spec, see mnesia:select
.
select(integer() | :read | :write, any()) :: Amnesia.Table.Selection.t() | nil | no_return()
Select records in the given table using a match_spec passing a limit or a
lock kind, see mnesia:select
.
select(integer() | :read | :write, integer() | :read | :write, integer()) :: Amnesia.Table.Selection.t() | nil | no_return()
Select records in the given table using a match_spec passing a limit and a
lock kind, see mnesia:select
.
Select records in the table using a match_spec, see
mnesia:dirty_select
.
Check if the table is a set.
stream(:read | :write | :write!) :: Amnesia.Table.Stream.t()
Return an iterator to use with Enum functions.
Return an iterator to use with the Enum functions using dirty operations to retrieve information.
Return the type of the table.
wait(integer() | :infinity) :: :ok | {:timeout, [atom()]} | {:error, atom()}
Wait for the table optionally with a timeout.
Select records in the table using an Exquisite query, see
Exquisite.match/2
and mnesia:select
.
Options
limit
- sets the count of elements to select in every continuationlock
- sets the kind of lock to useselect
- Exquisite selector specqualified
- whether to set a name for the record or not
Select records in the table using an Exquisite query, see
Exquisite.match/2
and mnesia:dirty_select
.
Options
select
- Exquisite selector specqualified
- whether to set a name for the record or not
Write the record to the table, see mnesia:write
.
Missing fields tagged as autoincrement will be incremented with the
counter if nil
.
Write the record to the table, see mnesia:dirty_write
.
Missing fields tagged as autoincrement will be incremented with the
counter if nil
.