Skip to content

Latest commit

 

History

History
203 lines (107 loc) · 5.68 KB

couchbeam_util.md

File metadata and controls

203 lines (107 loc) · 5.68 KB

Module couchbeam_util

Function Index

binary_env/2
dbname/1
deprecated/3
encode_att_name/1
encode_docid/1
encode_docid1/1
encode_docid_noop/1
encode_query/1Encode needed value of Query proplists in json.
encode_query_value/2Encode value in JSON if needed depending on the key.
force_param/3replace a value in a proplist.
get_app_env/2
get_value/2emulate proplists:get_value/2,3 but use faster lists:keyfind/3.
get_value/3
oauth_header/3
parse_options/1make view options a list.
parse_options/2
propmerge/3merge 2 proplists.
propmerge1/2Update a proplist with values of the second.
proxy_header/3
proxy_token/2
shutdown_sync/1
start_app_deps/1Start depedent applications of App.
to_atom/1
to_binary/1
to_integer/1
to_list/1

Function Details

binary_env/2

binary_env(Key, Default) -> any()

dbname/1

dbname(DbName) -> any()

deprecated/3

deprecated(Old, New, When) -> any()

encode_att_name/1

encode_att_name(Name) -> any()

encode_docid/1

encode_docid(DocId) -> any()

encode_docid1/1

encode_docid1(DocId) -> any()

encode_docid_noop/1

encode_docid_noop(DocId) -> any()

encode_query/1

encode_query(QSL) -> any()

Encode needed value of Query proplists in json

encode_query_value/2

encode_query_value(K, V) -> any()

Encode value in JSON if needed depending on the key

force_param/3

force_param(Key, Value, Options) -> any()

replace a value in a proplist

get_app_env/2

get_app_env(Env, Default) -> any()

get_value/2


get_value(Key::term(), Prop::[term()]) -> term()

emulate proplists:get_value/2,3 but use faster lists:keyfind/3

get_value/3


get_value(Key::term(), Prop::[term()], Default::term()) -> term()

oauth_header/3

oauth_header(Url, Action, OauthProps) -> any()

parse_options/1

parse_options(Options) -> any()

make view options a list

parse_options/2

parse_options(Rest, Acc) -> any()

propmerge/3

propmerge(F, L1, L2) -> any()

merge 2 proplists. All the Key - Value pairs from both proplists are included in the new proplists. If a key occurs in both dictionaries then Fun is called with the key and both values to return a new value. This a wreapper around dict:merge

propmerge1/2

propmerge1(L1, L2) -> any()

Update a proplist with values of the second. In case the same key is in 2 proplists, the value from the first are kept.

proxy_header/3

proxy_header(UserName, Roles, Secret) -> any()

proxy_token/2

proxy_token(Secret, UserName) -> any()

shutdown_sync/1

shutdown_sync(Pid) -> any()

start_app_deps/1


start_app_deps(App::atom()) -> ok

Start depedent applications of App.

to_atom/1

to_atom(V) -> any()

to_binary/1

to_binary(V) -> any()

to_integer/1

to_integer(V) -> any()

to_list/1

to_list(V) -> any()