summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexey Shchepin <alexey@process-one.net>2016-02-18 17:38:25 +0300
committerAlexey Shchepin <alexey@process-one.net>2016-03-02 00:12:49 +0300
commit2d042f078e6d23a947819c1bb9629be501c6d9c2 (patch)
tree211658919f6e09de6c3ce1599e3842a29c41a616 /include
parentUpdate mod_roster and ejabberd_auth_odbc SQL queries to the new API (diff)
New parse transform for ?SQL_UPSERT and ?SQL_UPSERT_T
Diffstat (limited to 'include')
-rw-r--r--include/ejabberd_sql_pt.hrl6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ejabberd_sql_pt.hrl b/include/ejabberd_sql_pt.hrl
index ca6df9ec..f189fdcf 100644
--- a/include/ejabberd_sql_pt.hrl
+++ b/include/ejabberd_sql_pt.hrl
@@ -21,6 +21,12 @@
-define(SQL_MARK, sql__mark_).
-define(SQL(SQL), ?SQL_MARK(SQL)).
+-define(SQL_UPSERT_MARK, sql_upsert__mark_).
+-define(SQL_UPSERT(Host, Table, Fields),
+ ejabberd_odbc:sql_query(Host, ?SQL_UPSERT_MARK(Table, Fields))).
+-define(SQL_UPSERT_T(Table, Fields),
+ ejabberd_odbc:sql_query_t(Host, ?SQL_UPSERT_MARK(Table, Fields))).
+
-record(sql_query, {hash, format_query, format_res, args, loc}).
-record(sql_escape, {string, integer, boolean}).