aboutsummaryrefslogtreecommitdiff
path: root/include/ejabberd_sql.hrl
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-03-04 15:30:06 +0100
committerBadlop <badlop@process-one.net>2021-03-04 16:41:24 +0100
commitc45b526ec398236e765ee890467a23b813b3d88a (patch)
tree11ceb317c725b1d3943fb64da8d9060110a4638e /include/ejabberd_sql.hrl
parentGet back description and simplify processing (#3507) (diff)
Update sql_query record to handle the Erlang/OTP 24 compiler reports
As mentioned in the Erlang/OTP 24 announcement: "Compiler warnings and errors now include column numbers in addition to line numbers."
Diffstat (limited to '')
-rw-r--r--include/ejabberd_sql.hrl8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ejabberd_sql.hrl b/include/ejabberd_sql.hrl
index 5e572db9a..2d9ac03ec 100644
--- a/include/ejabberd_sql.hrl
+++ b/include/ejabberd_sql.hrl
@@ -29,11 +29,19 @@
-define(SQL_INSERT_MARK, sql_insert__mark_).
-define(SQL_INSERT(Table, Fields), ?SQL_INSERT_MARK(Table, Fields)).
+-ifdef(COMPILER_REPORTS_ONLY_LINES).
-record(sql_query, {hash :: binary(),
format_query :: fun(),
format_res :: fun(),
args :: fun(),
loc :: {module(), pos_integer()}}).
+-else.
+-record(sql_query, {hash :: binary(),
+ format_query :: fun(),
+ format_res :: fun(),
+ args :: fun(),
+ loc :: {module(), {pos_integer(), pos_integer()}}}).
+-endif.
-record(sql_escape, {string :: fun((binary()) -> binary()),
integer :: fun((integer()) -> binary()),