diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-03-31 19:08:16 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-03-31 19:08:16 +0300 |
commit | 178a0a3e1b7d685b5fb85411304dba8ea86ac50c (patch) | |
tree | cd7dc412b28fa55f49c7f6840d8754cf925ee4c6 /src | |
parent | 05ef009552ac462edd13809cd44d8b76b8a765c6 (diff) | |
parent | 316da0034503b782c6bebaf3062b65da9f42605b (diff) |
Merge branch 'master' of github.com:processone/ejabberd
Diffstat (limited to 'src')
-rw-r--r-- | src/ejabberd_sql.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ejabberd_sql.erl b/src/ejabberd_sql.erl index ab0601a6c..b9dbbe7ce 100644 --- a/src/ejabberd_sql.erl +++ b/src/ejabberd_sql.erl @@ -39,6 +39,8 @@ sql_query_t/1, sql_transaction/2, sql_bloc/2, + abort/1, + restart/1, sql_query_to_iolist/1, escape/1, standard_escape/1, @@ -190,6 +192,12 @@ sql_query_t(Query) -> _ -> QRes end. +abort(Reason) -> + exit(Reason). + +restart(Reason) -> + throw({aborted, Reason}). + %% Escape character that will confuse an SQL engine escape(S) -> << <<(sql_queries:escape(Char))/binary>> || <<Char>> <= S >>. |