Module shards

This is the main module, which contains all Shards API functions.

See also: shards_dist, shards_local.

Description

This is the main module, which contains all Shards API functions. This is a wrapper on top of shards_local and shards_dist.

Data Types

continuation()

continuation() = shards_local:continuation()

Function Index

all/0Equivalent to shards_local:all / 0.
delete/1 Wrapper to shards_local:delete/1 and shards_dist:delete/1.
delete/2 Wrapper to shards_local:delete/3 and shards_dist:delete/3.
delete_all_objects/1 Wrapper to shards_local:delete_all_objects/2 and shards_dist:delete_all_objects/2.
delete_object/2 Wrapper to shards_local:delete_object/3 and shards_dist:delete_object/3.
file2tab/1Equivalent to file2tab(Filename, []).
file2tab/2 Wrapper to shards_local:file2tab/2 and shards_dist:file2tab/2.
first/1 Wrapper to shards_local:first/2 and shards_dist:first/2.
foldl/3 Wrapper to shards_local:foldl/4 and shards_dist:foldl/4.
foldr/3 Wrapper to shards_local:foldr/4 and shards_dist:foldr/4.
get_nodes/1
give_away/3 Wrapper to shards_local:give_away/4 and shards_dist:give_away/4.
i/0Equivalent to shards_local:i / 0.
info/1 Wrapper to shards_local:info/2 and shards_dist:info/2.
info/2 Wrapper to shards_local:info/3 and shards_dist:info/3.
info_shard/1Equivalent to shards_local:info_shard / 1.
info_shard/2Equivalent to shards_local:info_shard / 2.
insert/2 Wrapper to shards_local:insert/3 and shards_dist:insert/3.
insert_new/2 Wrapper to shards_local:insert_new/3 and shards_dist:insert_new/3.
is_compiled_ms/1Equivalent to shards_local:is_compiled_ms / 1.
join/2
last/1 Wrapper to shards_local:last/2 and shards_dist:last/2.
leave/2
list/1 Returns the list of shard names associated to the given TabName.
lookup/2 Wrapper to shards_local:lookup/3 and shards_dist:lookup/3.
lookup_element/3 Wrapper to shards_local:lookup_element/4 and shards_dist:lookup_element/4.
match/1 Wrapper to shards_local:match/2 and shards_dist:match/2.
match/2 Wrapper to shards_local:match/3 and shards_dist:match/3.
match/3 Wrapper to shards_local:match/4 and shards_dist:match/4.
match_delete/2 Wrapper to shards_local:match_delete/3 and shards_dist:match_delete/3.
match_object/1 Wrapper to shards_local:match_object/2 and shards_dist:match_object/2.
match_object/2 Wrapper to shards_local:match_object/3 and shards_dist:match_object/3.
match_object/3 Wrapper to shards_local:match_object/4 and shards_dist:match_object/4.
match_spec_compile/1Equivalent to shards_local:match_spec_compile / 1.
match_spec_run/2Equivalent to shards_local:match_spec_run / 2.
member/2 Wrapper to shards_local:member/3 and shards_dist:member/3.
new/2 Wrapper to shards_local:new/2 and shards_dist:new/2.
next/2 Wrapper to shards_local:next/3 and shards_dist:next/3.
prev/2 Wrapper to shards_local:prev/3 and shards_dist:prev/3.
rename/2 Wrapper to shards_local:rename/3 and shards_dist:rename/3.
safe_fixtable/2 Wrapper to shards_local:safe_fixtable/2 and shards_dist:safe_fixtable/2.
select/1 Wrapper to shards_local:select/2 and shards_dist:select/2.
select/2 Wrapper to shards_local:select/3 and shards_dist:select/3.
select/3 Wrapper to shards_local:select/4 and shards_dist:select/4.
select_count/2 Wrapper to shards_local:select_count/3 and shards_dist:select_count/3.
select_delete/2 Wrapper to shards_local:select_delete/3 and shards_dist:select_delete/3.
select_reverse/1 Wrapper to shards_local:select_reverse/2 and shards_dist:select_reverse/2.
select_reverse/2 Wrapper to shards_local:select_reverse/3 and shards_dist:select_reverse/3.
select_reverse/3 Wrapper to shards_local:select_reverse/4 and shards_dist:select_reverse/4.
setopts/2 Wrapper to shards_local:setopts/3 and shards_dist:setopts/3.
start/0Starts shards application.
state/1 Utility to get the state for the given table Tab.
stop/0Stops shards application.
tab2file/2Equivalent to tab2file(Tab, Filename, []).
tab2file/3 Wrapper to shards_local:tab2file/4 and shards_dist:tab2file/4.
tab2list/1 Wrapper to shards_local:tab2list/2 and shards_dist:tab2list/2.
tabfile_info/1 Wrapper to shards_local:tabfile_info/1 and shards_dist:tabfile_info/1.
table/1 Wrapper to shards_local:table/2 and shards_dist:table/2.
table/2 Wrapper to shards_local:table/3 and shards_dist:table/3.
take/2 Wrapper to shards_local:take/3 and shards_dist:take/3.
test_ms/2Equivalent to shards_local:test_ms / 2.
update_counter/3 Wrapper to shards_local:update_counter/4 and shards_dist:update_counter/4.
update_counter/4 Wrapper to shards_local:update_counter/5 and shards_dist:update_counter/5.
update_element/3 Wrapper to shards_local:update_element/4 and shards_dist:update_element/4.

Function Details

all/0

all() -> any()

Equivalent to shards_local:all / 0.

delete/1

delete(Tab::atom()) -> true

Wrapper to shards_local:delete/1 and shards_dist:delete/1.

See also: shards_dist:delete/1, shards_local:delete/1.

delete/2

delete(Tab, Key) -> true

Wrapper to shards_local:delete/3 and shards_dist:delete/3.

See also: shards_dist:delete/3, shards_local:delete/3.

delete_all_objects/1

delete_all_objects(Tab::atom()) -> true

Wrapper to shards_local:delete_all_objects/2 and shards_dist:delete_all_objects/2.

See also: shards_dist:delete_all_objects/2, shards_local:delete_all_objects/2.

delete_object/2

delete_object(Tab, Object) -> true

Wrapper to shards_local:delete_object/3 and shards_dist:delete_object/3.

See also: shards_dist:delete_object/3, shards_local:delete_object/3.

file2tab/1

file2tab(Filename) -> any()

Equivalent to file2tab(Filename, []).

file2tab/2

file2tab(Filename, Options) -> Response

Wrapper to shards_local:file2tab/2 and shards_dist:file2tab/2.

See also: shards_dist:file2tab/2, shards_local:file2tab/2.

first/1

first(Tab::atom()) -> Key::term() | '$end_of_table'

Wrapper to shards_local:first/2 and shards_dist:first/2.

See also: shards_dist:first/2, shards_local:first/2.

foldl/3

foldl(Function, Acc0, Tab) -> Acc1

Wrapper to shards_local:foldl/4 and shards_dist:foldl/4.

See also: shards_dist:foldl/4, shards_local:foldl/4.

foldr/3

foldr(Function, Acc0, Tab) -> Acc1

Wrapper to shards_local:foldr/4 and shards_dist:foldr/4.

See also: shards_dist:foldr/4, shards_local:foldr/4.

get_nodes/1

get_nodes(Tab) -> Nodes

give_away/3

give_away(Tab, Pid, GiftData) -> true

Wrapper to shards_local:give_away/4 and shards_dist:give_away/4.

See also: shards_dist:give_away/4, shards_local:give_away/4.

i/0

i() -> any()

Equivalent to shards_local:i / 0.

info/1

info(Tab) -> Result

Wrapper to shards_local:info/2 and shards_dist:info/2.

See also: shards_dist:info/2, shards_local:info/2.

info/2

info(Tab, Item) -> Value

Wrapper to shards_local:info/3 and shards_dist:info/3.

See also: shards_dist:info/3, shards_local:info/3.

info_shard/1

info_shard(ShardTab) -> any()

Equivalent to shards_local:info_shard / 1.

info_shard/2

info_shard(ShardTab, Item) -> any()

Equivalent to shards_local:info_shard / 2.

insert/2

insert(Tab, ObjOrObjL) -> true

Wrapper to shards_local:insert/3 and shards_dist:insert/3.

See also: shards_dist:insert/3, shards_local:insert/3.

insert_new/2

insert_new(Tab, ObjOrObjL) -> Result

Wrapper to shards_local:insert_new/3 and shards_dist:insert_new/3.

See also: shards_dist:insert_new/3, shards_local:insert_new/3.

is_compiled_ms/1

is_compiled_ms(Term) -> any()

Equivalent to shards_local:is_compiled_ms / 1.

join/2

join(Tab, Nodes) -> JoinedNodes

last/1

last(Tab::atom()) -> Key::term() | '$end_of_table'

Wrapper to shards_local:last/2 and shards_dist:last/2.

See also: shards_dist:last/2, shards_local:last/2.

leave/2

leave(Tab, Nodes) -> LeavedNodes

list/1

list(Tab) -> Result

Returns the list of shard names associated to the given TabName. The shard names that were created in the shards:new/2,3 fun.

lookup/2

lookup(Tab, Key) -> Result

Wrapper to shards_local:lookup/3 and shards_dist:lookup/3.

See also: shards_dist:lookup/3, shards_local:lookup/3.

lookup_element/3

lookup_element(Tab, Key, Pos) -> Elem

Wrapper to shards_local:lookup_element/4 and shards_dist:lookup_element/4.

See also: shards_dist:lookup_element/4, shards_local:lookup_element/4.

match/1

match(Continuation) -> Response

Wrapper to shards_local:match/2 and shards_dist:match/2.

See also: shards_dist:match/2, shards_local:match/2.

match/2

match(Tab, Pattern) -> [Match]

Wrapper to shards_local:match/3 and shards_dist:match/3.

See also: shards_dist:match/3, shards_local:match/3.

match/3

match(Tab, Pattern, Limit) -> Response

Wrapper to shards_local:match/4 and shards_dist:match/4.

See also: shards_dist:match/4, shards_local:match/4.

match_delete/2

match_delete(Tab, Pattern) -> true

Wrapper to shards_local:match_delete/3 and shards_dist:match_delete/3.

See also: shards_dist:match_delete/3, shards_local:match_delete/3.

match_object/1

match_object(Continuation) -> Response

Wrapper to shards_local:match_object/2 and shards_dist:match_object/2.

See also: shards_dist:match_object/2, shards_local:match_object/2.

match_object/2

match_object(Tab, Pattern) -> [Object]

Wrapper to shards_local:match_object/3 and shards_dist:match_object/3.

See also: shards_dist:match_object/3, shards_local:match_object/3.

match_object/3

match_object(Tab, Pattern, Limit) -> Response

Wrapper to shards_local:match_object/4 and shards_dist:match_object/4.

See also: shards_dist:match_object/4, shards_local:match_object/4.

match_spec_compile/1

match_spec_compile(MatchSpec) -> any()

Equivalent to shards_local:match_spec_compile / 1.

match_spec_run/2

match_spec_run(List, CompiledMatchSpec) -> any()

Equivalent to shards_local:match_spec_run / 2.

member/2

member(Tab::atom(), Key::term()) -> boolean()

Wrapper to shards_local:member/3 and shards_dist:member/3.

See also: shards_dist:member/3, shards_local:member/3.

new/2

new(Name, Options) -> Name

Wrapper to shards_local:new/2 and shards_dist:new/2.

See also: shards_dist:new/2, shards_local:new/2.

next/2

next(Tab, Key1) -> Key2 | '$end_of_table'

Wrapper to shards_local:next/3 and shards_dist:next/3.

See also: shards_dist:next/3, shards_local:next/3.

prev/2

prev(Tab, Key1) -> Key2 | '$end_of_table'

Wrapper to shards_local:prev/3 and shards_dist:prev/3.

See also: shards_dist:prev/3, shards_local:prev/3.

rename/2

rename(Tab, Name) -> Name | no_return()

Wrapper to shards_local:rename/3 and shards_dist:rename/3.

See also: shards_dist:rename/3, shards_local:rename/3.

safe_fixtable/2

safe_fixtable(Tab, Fix) -> boolean()

Wrapper to shards_local:safe_fixtable/2 and shards_dist:safe_fixtable/2.

See also: safe_fixtable:select/2, safe_fixtable:select/2.

select/1

select(Continuation) -> Response

Wrapper to shards_local:select/2 and shards_dist:select/2.

See also: shards_dist:select/2, shards_local:select/2.

select/2

select(Tab, MatchSpec) -> [Match]

Wrapper to shards_local:select/3 and shards_dist:select/3.

See also: shards_dist:select/3, shards_local:select/3.

select/3

select(Tab, MatchSpec, Limit) -> Response

Wrapper to shards_local:select/4 and shards_dist:select/4.

See also: shards_dist:select/4, shards_local:select/4.

select_count/2

select_count(Tab, MatchSpec) -> NumMatched

Wrapper to shards_local:select_count/3 and shards_dist:select_count/3.

See also: shards_dist:select_count/3, shards_local:select_count/3.

select_delete/2

select_delete(Tab, MatchSpec) -> NumDeleted

Wrapper to shards_local:select_delete/3 and shards_dist:select_delete/3.

See also: shards_dist:select_delete/3, shards_local:select_delete/3.

select_reverse/1

select_reverse(Continuation) -> Response

Wrapper to shards_local:select_reverse/2 and shards_dist:select_reverse/2.

See also: shards_dist:select_reverse/2, shards_local:select_reverse/2.

select_reverse/2

select_reverse(Tab, MatchSpec) -> [Match]

Wrapper to shards_local:select_reverse/3 and shards_dist:select_reverse/3.

See also: shards_dist:select_reverse/3, shards_local:select_reverse/3.

select_reverse/3

select_reverse(Tab, MatchSpec, Limit) -> Response

Wrapper to shards_local:select_reverse/4 and shards_dist:select_reverse/4.

See also: shards_dist:select_reverse/4, shards_local:select_reverse/4.

setopts/2

setopts(Tab, Opts) -> boolean()

Wrapper to shards_local:setopts/3 and shards_dist:setopts/3.

See also: shards_dist:setopts/3, shards_local:setopts/3.

start/0

start() -> ok | {error, term()}

Starts shards application.

state/1

state(Tab::atom()) -> shards_state:state()

Utility to get the state for the given table Tab.

stop/0

stop() -> ok | {error, term()}

Stops shards application.

tab2file/2

tab2file(Tab, Filename) -> any()

Equivalent to tab2file(Tab, Filename, []).

tab2file/3

tab2file(Tab, Filename, Options) -> Response

Wrapper to shards_local:tab2file/4 and shards_dist:tab2file/4.

See also: shards_dist:tab2file/4, shards_local:tab2file/4.

tab2list/1

tab2list(Tab) -> [Object]

Wrapper to shards_local:tab2list/2 and shards_dist:tab2list/2.

See also: shards_dist:tab2list/2, shards_local:tab2list/2.

tabfile_info/1

tabfile_info(Filename) -> Response

Wrapper to shards_local:tabfile_info/1 and shards_dist:tabfile_info/1.

See also: shards_dist:tabfile_info/1, shards_local:tabfile_info/1.

table/1

table(Tab) -> [QueryHandle]

Wrapper to shards_local:table/2 and shards_dist:table/2.

See also: shards_dist:table/2, shards_local:table/2.

table/2

table(Tab, Options) -> [QueryHandle]

Wrapper to shards_local:table/3 and shards_dist:table/3.

See also: shards_dist:table/3, shards_local:table/3.

take/2

take(Tab, Key) -> [Object]

Wrapper to shards_local:take/3 and shards_dist:take/3.

See also: shards_dist:take/3, shards_local:take/3.

test_ms/2

test_ms(Tuple, MatchSpec) -> any()

Equivalent to shards_local:test_ms / 2.

update_counter/3

update_counter(Tab, Key, UpdateOp) -> Result

Wrapper to shards_local:update_counter/4 and shards_dist:update_counter/4.

See also: shards_dist:update_counter/4, shards_local:update_counter/4.

update_counter/4

update_counter(Tab, Key, UpdateOp, Default) -> Result

Wrapper to shards_local:update_counter/5 and shards_dist:update_counter/5.

See also: shards_dist:update_counter/5, shards_local:update_counter/5.

update_element/3

update_element(Tab, Key, ElementSpec) -> boolean()

Wrapper to shards_local:update_element/4 and shards_dist:update_element/4.

See also: shards_dist:update_element/4, shards_local:update_element/4.


Generated by EDoc, Jul 11 2017, 14:57:01.