mnesia_session.erl
来自「OTP是开放电信平台的简称」· ERL 代码 · 共 805 行 · 第 1/2 页
ERL
805 行
%%%%------------------------------------------------------------oe_create() -> start([], []).oe_create_link() -> start_link([], []).oe_create(Env) -> start(Env, []).oe_create_link(Env) -> start_link(Env, []).oe_create(Env, RegName) -> start(RegName, Env, []).oe_create_link(Env, RegName) -> start_link(RegName, Env, []).%%------------------------------------------------------------%%%% Start functions.%%%%------------------------------------------------------------start(Env, Opt) -> gen_server:start(?MODULE, Env, Opt).start_link(Env, Opt) -> gen_server:start_link(?MODULE, Env, Opt).start(RegName, Env, Opt) -> gen_server:start(RegName, ?MODULE, Env, Opt).start_link(RegName, Env, Opt) -> gen_server:start_link(RegName, ?MODULE, Env, Opt).%% Standard gen_server terminationstop(OE_THIS) -> gen_server:cast(OE_THIS,stop).%% Call to implementation initinit(Env) -> mnesia_session_impl:init(Env).terminate(Reason, State) -> mnesia_session_impl:terminate(Reason, State).%%%% Operation: dirty_write%% %% Returns: RetVal, Reason%%handle_call({dirty_write, Tab, Object}, _, OE_State) -> mnesia_session_impl:dirty_write(OE_State, Tab, Object);%%%% Operation: dirty_read%% %% Returns: RetVal, Result, Reason%%handle_call({dirty_read, Tab, Key}, _, OE_State) -> mnesia_session_impl:dirty_read(OE_State, Tab, Key);%%%% Operation: dirty_update_counter%% %% Returns: RetVal, Newval, Reason%%handle_call({dirty_update_counter, Tab, Key, Val}, _, OE_State) -> mnesia_session_impl:dirty_update_counter(OE_State, Tab, Key, Val);%%%% Operation: dirty_delete%% %% Returns: RetVal, Reason%%handle_call({dirty_delete, Tab, Key}, _, OE_State) -> mnesia_session_impl:dirty_delete(OE_State, Tab, Key);%%%% Operation: dirty_delete_object%% %% Returns: RetVal, Reason%%handle_call({dirty_delete_object, Tab, Object}, _, OE_State) -> mnesia_session_impl:dirty_delete_object(OE_State, Tab, Object);%%%% Operation: dirty_slot%% %% Returns: RetVal, Result, Reason%%handle_call({dirty_slot, Tab, Slot}, _, OE_State) -> mnesia_session_impl:dirty_slot(OE_State, Tab, Slot);%%%% Operation: dirty_first%% %% Returns: RetVal, Next_key, Reason%%handle_call({dirty_first, Tab}, _, OE_State) -> mnesia_session_impl:dirty_first(OE_State, Tab);%%%% Operation: dirty_next%% %% Returns: RetVal, Next_key, Reason%%handle_call({dirty_next, Tab, Key}, _, OE_State) -> mnesia_session_impl:dirty_next(OE_State, Tab, Key);%%%% Operation: dirty_all_keys%% %% Returns: RetVal, Keys, Reason%%handle_call({dirty_all_keys, Tab}, _, OE_State) -> mnesia_session_impl:dirty_all_keys(OE_State, Tab);%%%% Operation: dirty_match_all%% %% Returns: RetVal, Result, Reason%%handle_call({dirty_match_all, Tab}, _, OE_State) -> mnesia_session_impl:dirty_match_all(OE_State, Tab);%%%% Operation: dirty_index_read%% %% Returns: RetVal, Result, Reason%%handle_call({dirty_index_read, Tab, Key, Pos}, _, OE_State) -> mnesia_session_impl:dirty_index_read(OE_State, Tab, Key, Pos);%%%% Operation: create_table%% %% Returns: RetVal, Reason%%handle_call({create_table, Tab, TabDefs}, _, OE_State) -> mnesia_session_impl:create_table(OE_State, Tab, TabDefs);%%%% Operation: delete_table%% %% Returns: RetVal, Reason%%handle_call({delete_table, Tab}, _, OE_State) -> mnesia_session_impl:delete_table(OE_State, Tab);%%%% Operation: add_table_copy%% %% Returns: RetVal, Reason%%handle_call({add_table_copy, Tab, Node, Type}, _, OE_State) -> mnesia_session_impl:add_table_copy(OE_State, Tab, Node, Type);%%%% Operation: del_table_copy%% %% Returns: RetVal, Reason%%handle_call({del_table_copy, Tab, Node}, _, OE_State) -> mnesia_session_impl:del_table_copy(OE_State, Tab, Node);%%%% Operation: move_table_copy%% %% Returns: RetVal, Reason%%handle_call({move_table_copy, Tab, From, To}, _, OE_State) -> mnesia_session_impl:move_table_copy(OE_State, Tab, From, To);%%%% Operation: add_table_index%% %% Returns: RetVal, Reason%%handle_call({add_table_index, Tab, Attrname}, _, OE_State) -> mnesia_session_impl:add_table_index(OE_State, Tab, Attrname);%%%% Operation: del_table_index%% %% Returns: RetVal, Reason%%handle_call({del_table_index, Tab, Attrname}, _, OE_State) -> mnesia_session_impl:del_table_index(OE_State, Tab, Attrname);%%%% Operation: change_table_copy_type%% %% Returns: RetVal, Reason%%handle_call({change_table_copy_type, Tab, Node, Type}, _, OE_State) -> mnesia_session_impl:change_table_copy_type(OE_State, Tab, Node, Type);%%%% Operation: change_table_access_mode%% %% Returns: RetVal, Reason%%handle_call({change_table_access_mode, Tab, Mode}, _, OE_State) -> mnesia_session_impl:change_table_access_mode(OE_State, Tab, Mode);%%%% Operation: wait_for_tables%% %% Returns: RetVal, Failed_tabs, Reason%%handle_call({wait_for_tables, Tabs, Timeout}, _, OE_State) -> mnesia_session_impl:wait_for_tables(OE_State, Tabs, Timeout);%%%% Operation: force_load_table%% %% Returns: RetVal, Reason%%handle_call({force_load_table, Tab}, _, OE_State) -> mnesia_session_impl:force_load_table(OE_State, Tab);%%%% Operation: change_table_load_order%% %% Returns: RetVal, Reason%%handle_call({change_table_load_order, Tab, Load_order}, _, OE_State) -> mnesia_session_impl:change_table_load_order(OE_State, Tab, Load_order);%%%% Operation: set_master_nodes1%% %% Returns: RetVal, Reason%%handle_call({set_master_nodes1, Nodes}, _, OE_State) -> mnesia_session_impl:set_master_nodes1(OE_State, Nodes);%%%% Operation: set_master_nodes2%% %% Returns: RetVal, Reason%%handle_call({set_master_nodes2, Tab, Nodes}, _, OE_State) -> mnesia_session_impl:set_master_nodes2(OE_State, Tab, Nodes);%%%% Operation: backup1%% %% Returns: RetVal, Reason%%handle_call({backup1, Filename}, _, OE_State) -> mnesia_session_impl:backup1(OE_State, Filename);%%%% Operation: backup2%% %% Returns: RetVal, Reason%%handle_call({backup2, Opaque, Modulename}, _, OE_State) -> mnesia_session_impl:backup2(OE_State, Opaque, Modulename);%%%% Operation: install_fallback1%% %% Returns: RetVal, Reason%%handle_call({install_fallback1, Filename}, _, OE_State) -> mnesia_session_impl:install_fallback1(OE_State, Filename);%%%% Operation: install_fallback2%% %% Returns: RetVal, Reason%%handle_call({install_fallback2, Opaque, Modulename}, _, OE_State) -> mnesia_session_impl:install_fallback2(OE_State, Opaque, Modulename);%%%% Operation: uninstall_fallback%% %% Returns: RetVal, Reason%%handle_call(uninstall_fallback, _, OE_State) -> mnesia_session_impl:uninstall_fallback(OE_State);%%%% Operation: dump_log%% %% Returns: RetVal, Reason%%handle_call(dump_log, _, OE_State) -> mnesia_session_impl:dump_log(OE_State);%%%% Operation: dump_tables%% %% Returns: RetVal, Reason%%handle_call({dump_tables, List}, _, OE_State) -> mnesia_session_impl:dump_tables(OE_State, List);%%%% Operation: activate_checkpoint%% %% Returns: RetVal, Reason%%handle_call({activate_checkpoint, Cpdef}, _, OE_State) -> mnesia_session_impl:activate_checkpoint(OE_State, Cpdef);%%%% Operation: deactivate_checkpoint%% %% Returns: RetVal, Reason%%handle_call({deactivate_checkpoint, CpName}, _, OE_State) -> mnesia_session_impl:deactivate_checkpoint(OE_State, CpName);%%%% Operation: backup_checkpoint1%% %% Returns: RetVal, Reason%%handle_call({backup_checkpoint1, CpName, Filename}, _, OE_State) -> mnesia_session_impl:backup_checkpoint1(OE_State, CpName, Filename);%%%% Operation: backup_checkpoint2%% %% Returns: RetVal, Reason%%handle_call({backup_checkpoint2, CpName, Opaque, Modulename}, _, OE_State) -> mnesia_session_impl:backup_checkpoint2(OE_State, CpName, Opaque, Modulename);%%%% Operation: load_textfile%% %% Returns: RetVal, Reason%%handle_call({load_textfile, Filename}, _, OE_State) -> mnesia_session_impl:load_textfile(OE_State, Filename);%%%% Operation: dump_to_textfile%% %% Returns: RetVal, Reason%%handle_call({dump_to_textfile, Filename}, _, OE_State) -> mnesia_session_impl:dump_to_textfile(OE_State, Filename);%%%% Operation: table_info%% %% Returns: RetVal, Info, Reason%%handle_call({table_info, Tab}, _, OE_State) -> mnesia_session_impl:table_info(OE_State, Tab);%%%% Operation: system_info%% %% Returns: RetVal, Info, Reason%%handle_call(system_info, _, OE_State) -> mnesia_session_impl:system_info(OE_State);%%%% Operation: dirty_match_object%% %% Returns: RetVal, Result, Reason%%handle_call({dirty_match_object, Tab, Pattern}, _, OE_State) -> mnesia_session_impl:dirty_match_object(OE_State, Tab, Pattern);%%%% Operation: dirty_index_match_object%% %% Returns: RetVal, Result, Reason%%handle_call({dirty_index_match_object, Tab, Pattern, Pos}, _, OE_State) -> mnesia_session_impl:dirty_index_match_object(OE_State, Tab, Pattern, Pos);%%%% Operation: create_schema%% %% Returns: RetVal, Reason%%handle_call({create_schema, Nodes}, _, OE_State) -> mnesia_session_impl:create_schema(OE_State, Nodes);%%%% Operation: delete_schema%% %% Returns: RetVal, Reason%%handle_call({delete_schema, Nodes}, _, OE_State) -> mnesia_session_impl:delete_schema(OE_State, Nodes);%%%% Operation: start_mnesia%% %% Returns: RetVal, Reason%%handle_call(start_mnesia, _, OE_State) -> mnesia_session_impl:start_mnesia(OE_State);%%%% Operation: stop_mnesia%% %% Returns: RetVal, Reason%%handle_call(stop_mnesia, _, OE_State) -> mnesia_session_impl:stop_mnesia(OE_State);%%%% Standard gen_server call handle%%handle_call(stop, _, State) -> {stop, normal, ok, State}.%%%% Standard gen_server cast handle%%handle_cast(stop, State) -> {stop, normal, State}.%%%% Standard gen_server handles%%handle_info(_, State) -> {noreply, State}.code_change(OldVsn, State, Extra) -> mnesia_session_impl:code_change(OldVsn, State, Extra).
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?