Behaviours: watts_persistent.
See also: watts_persistent_mnesia.
create_table/3* | create a single table and wait for it to be ready. |
create_tables/0* | create the needed tables. |
credential_add/5 | store a credential for a user A callback from the watts_persistent behaviour. |
credential_get/1 | get a specific credential. |
credential_get_count/2 | get the number of credentials for a user at a service. |
credential_get_list/1 | get the list of credentials for a user A callback from the watts_persistent behaviour. |
credential_remove/2 | remove a credential of a user A callback from the watts_persistent behaviour. |
initialize/0 | initialize the sqlite database. |
is_ready/0 | return if the database is ready. |
list_tables/0* | list all tables. |
setup_mnesia_if_needed/1* | setup the leveldb datbase in mnesia if needed. |
start_mnesia/0* | start the mensia application. |
stop_mnesia/0* | stop the mensia application. |
create_table(TableName::atom(), Attributes::list(), Indexes::[atom()]) -> ok | {timeout, [atom()]} | {error, Reason::any()}
create a single table and wait for it to be ready.
create_tables() -> ok | {timeout, [atom()]} | {error, Reason::any()}
create the needed tables
credential_add(UserId::binary(), ServiceId::binary(), Interface::binary(), CredState::any(), AllowNonUniqueStates::boolean()) -> {ok, CredentialID::binary()} | {error, Reason::atom()}
store a credential for a user A callback from the watts_persistent behaviour.
credential_get(CredId::binary()) -> {ok, watts:credential()} | {error, Reason::atom()}
get a specific credential. A callback from the watts_persistent behaviour.
credential_get_count(UserId::binary(), ServiceId::binary()) -> {ok, pos_integer()}
get the number of credentials for a user at a service. A callback from the watts_persistent behaviour.
credential_get_list(UserId::binary()) -> {ok, [watts:credential()]}
get the list of credentials for a user A callback from the watts_persistent behaviour.
credential_remove(UserId::binary(), CredentialId::binary()) -> ok | {error, Reason::atom()}
remove a credential of a user A callback from the watts_persistent behaviour.
initialize() -> ok
initialize the sqlite database. A callback from the watts_persistent behaviour.
is_ready() -> true | {false, Reason::atom()}
return if the database is ready. A callback from the watts_persistent behaviour.
list_tables() -> {ok, [any()]}
list all tables
setup_mnesia_if_needed(X1::boolean()) -> ok
setup the leveldb datbase in mnesia if needed
start_mnesia() -> ok
start the mensia application
stop_mnesia() -> ok
stop the mensia application
Generated by EDoc