More specific type for map_intersperse
This commit is contained in:
@@ -377,7 +377,7 @@ create_function(Db, FunctionName, Function) ->
|
|||||||
gen_server:call(Db, {create_function, FunctionName, Function}).
|
gen_server:call(Db, {create_function, FunctionName, Function}).
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% @spec value_to_sql_unsafe(Value :: sql_value()) -> iodata()
|
%% @spec value_to_sql_unsafe(Value :: sql_value()) -> iolist()
|
||||||
%% @doc
|
%% @doc
|
||||||
%% Converts an Erlang term to an SQL string.
|
%% Converts an Erlang term to an SQL string.
|
||||||
%% Currently supports integers, floats, 'null' atom, and iodata
|
%% Currently supports integers, floats, 'null' atom, and iodata
|
||||||
@@ -391,11 +391,11 @@ create_function(Db, FunctionName, Function) ->
|
|||||||
%% Reexported from sqlite3_lib:value_to_sql/1 for user convenience.
|
%% Reexported from sqlite3_lib:value_to_sql/1 for user convenience.
|
||||||
%% @end
|
%% @end
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
-spec value_to_sql_unsafe(sql_value()) -> iodata().
|
-spec value_to_sql_unsafe(sql_value()) -> iolist().
|
||||||
value_to_sql_unsafe(X) -> sqlite3_lib:value_to_sql_unsafe(X).
|
value_to_sql_unsafe(X) -> sqlite3_lib:value_to_sql_unsafe(X).
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% @spec value_to_sql(Value :: sql_value()) -> iodata()
|
%% @spec value_to_sql(Value :: sql_value()) -> iolist()
|
||||||
%% @doc
|
%% @doc
|
||||||
%% Converts an Erlang term to an SQL string.
|
%% Converts an Erlang term to an SQL string.
|
||||||
%% Currently supports integers, floats, 'null' atom, and iodata
|
%% Currently supports integers, floats, 'null' atom, and iodata
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ drop_table(Tbl) ->
|
|||||||
|
|
||||||
%% @doc Works like string:join for iolists
|
%% @doc Works like string:join for iolists
|
||||||
|
|
||||||
-spec map_intersperse(fun((X) -> Z), [X], Y) -> [Z | Y].
|
-spec map_intersperse(fun((X) -> iolist()), [X], [iolist() | integer()]) -> iolist().
|
||||||
map_intersperse(_Fun, [], _Sep) -> [];
|
map_intersperse(_Fun, [], _Sep) -> [];
|
||||||
map_intersperse(Fun, [Elem], _Sep) -> [Fun(Elem)];
|
map_intersperse(Fun, [Elem], _Sep) -> [Fun(Elem)];
|
||||||
map_intersperse(Fun, [Head | Tail], Sep) -> [Fun(Head), Sep | map_intersperse(Fun, Tail, Sep)].
|
map_intersperse(Fun, [Head | Tail], Sep) -> [Fun(Head), Sep | map_intersperse(Fun, Tail, Sep)].
|
||||||
|
|||||||
Reference in New Issue
Block a user