./ct_report/coverage/mongoose_cassandra_pool.COVER.html

1 %%==============================================================================
2 %% Copyright 2018 Erlang Solutions Ltd.
3 %%
4 %% Licensed under the Apache License, Version 2.0 (the "License");
5 %% you may not use this file except in compliance with the License.
6 %% You may obtain a copy of the License at
7 %%
8 %% http://www.apache.org/licenses/LICENSE-2.0
9 %%
10 %% Unless required by applicable law or agreed to in writing, software
11 %% distributed under the License is distributed on an "AS IS" BASIS,
12 %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 %% See the License for the specific language governing permissions and
14 %% limitations under the License.
15 %%==============================================================================
16 -module(mongoose_cassandra_pool).
17 -author('rafal.slota@erlang-solutions.com').
18
19 -include("mongoose_logger.hrl").
20
21
22 %% ====================================================================
23 %% Exports
24 %% ====================================================================
25
26 %% Module callbacks
27
28 %% API
29 -export([call_query/3, cast_query/3]).
30
31 %% Types
32
33 %% ====================================================================
34 %% Module API
35 %% ====================================================================
36
37 call_query(PoolName, undefined, Call) ->
38 14 mongoose_wpool:call(cassandra, global, PoolName, Call);
39 call_query(PoolName, ContextId, Call) ->
40 1407 mongoose_wpool:call(cassandra, global, PoolName, ContextId, Call).
41
42 cast_query(PoolName, undefined, Call) ->
43 336 mongoose_wpool:cast(cassandra, global, PoolName, Call);
44 cast_query(PoolName, ContextId, Call) ->
45 1033 mongoose_wpool:cast(cassandra, global, PoolName, ContextId, Call).
46
Line Hits Source