Skip to content

Latest commit

 

History

History
326 lines (157 loc) · 8.13 KB

mnesia_rocksdb_admin.md

File metadata and controls

326 lines (157 loc) · 8.13 KB

Module mnesia_rocksdb_admin

Behaviours: gen_server.

Data Types


alias() = atom()

backend() = #{db_ref => db_ref(), cf_info => #{table() => cf()}}

cf() = mrdb:db_ref()

db_ref() = rocksdb:db_handle()

gen_server_noreply() = {noreply, st()} | {stop, reason(), st()}

gen_server_reply() = {reply, reply(), st()} | {stop, reason(), reply(), st()}

properties() = [{atom(), any()}]

reason() = any()

reply() = any()

req() = {create_table, table(), properties()} | {delete_table, table()} | {load_table, table()} | {related_resources, table()} | {get_ref, table()} | {add_aliases, [alias()]} | {write_table_property, tabname(), tuple()} | {remove_aliases, [alias()]} | {migrate, [{tabname(), map()}]} | {prep_close, table()} | {close_table, table()}

st() = #st{backends = #{alias() => backend()}, standalone = #{{alias(), table()} => cf()}, default_opts = [{atom(), term()}]}

table() = tabname() | {admin, alias()} | {tabname(), index, any()} | {tabname(), retainer, any()}

tabname() = atom()

Function Index

add_aliases/1
close_table/2
code_change/3
create_table/3
delete_table/2
ensure_started/0
get_ref/1
get_ref/2
handle_call/3
handle_cast/2
handle_info/2
init/1
load_table/2
meta/0
migrate_standalone/2
prep_close/2
read_info/1
read_info/2
read_info/4
related_resources/2
remove_aliases/1
request_ref/2
start_link/0
terminate/2
write_info/4
write_table_property/3

Function Details

add_aliases/1

add_aliases(Aliases) -> any()

close_table/2

close_table(Alias, Name) -> any()

code_change/3

code_change(FromVsn, St, Extra) -> any()

create_table/3

create_table(Alias, Name, Props) -> any()

delete_table/2


delete_table(Alias::alias(), Name::tabname()) -> ok

ensure_started/0


ensure_started() -> ok

get_ref/1

get_ref(Name) -> any()

get_ref/2

get_ref(Name, Default) -> any()

handle_call/3


handle_call(Req::{alias(), req()}, From::any(), St::st()) -> gen_server_reply()

handle_cast/2


handle_cast(Msg::any(), St::st()) -> gen_server_noreply()

handle_info/2


handle_info(Msg::any(), St::st()) -> gen_server_noreply()

init/1

init(X1) -> any()

load_table/2

load_table(Alias, Name) -> any()

meta/0

meta() -> any()

migrate_standalone/2

migrate_standalone(Alias, Tabs) -> any()

prep_close/2

prep_close(Alias, Tab) -> any()

read_info/1

read_info(TRec) -> any()

read_info/2

read_info(Alias, Tab) -> any()

read_info/4

read_info(Alias, Tab, K, Default) -> any()

related_resources/2

related_resources(Alias, Name) -> any()

remove_aliases/1

remove_aliases(Aliases) -> any()

request_ref/2

request_ref(Alias, Name) -> any()

start_link/0

start_link() -> any()

terminate/2

terminate(X1, St) -> any()

write_info/4

write_info(Alias, Tab, K, V) -> any()

write_table_property/3

write_table_property(Alias, Tab, Prop) -> any()