Article - Talk ejabberd odbc
Return the list of ejabberd core modules
Relational database (ejabberd_odbc)
Used to run SQL queries.
API
The odbc_server configuration directive is used to set the connection parameters to the database.
Query without transaction
sql_query(Server, Request)
* Server = Request = string()
Run an SQL Request. Server is the name of the virtual host.
Query with transaction
sql_query_t(Request)
sql_transaction(Server, Fun)
* Server = Request = string()
* Fun = fun()
sql_transaction/2 is used to run some SQL requests, executed in the Fun function. Server is the name of the virtual host.sql_query_t/1 is used to run an SQL Request and can only be executed in the function called by sql_transaction/2.
