/*!
* \file
* \ingroup db
* \brief Database support for modules.
*
* Database support functions for modules.
*
* @cond
* WARNING:
* This file was autogenerated from the XML source file
* It can be regenerated by running 'make modules' in the db/schema
* directory of the source code. You need to have xsltproc and
* docbook-xsl stylesheets installed.
* ALL CHANGES DONE HERE WILL BE LOST IF THE FILE IS REGENERATED
* @endcond
*/
/* database variables */
/* TODO assign read-write or read-only URI, introduce a parameter in XML */
/*
* Closes the DB connection.
*/
/*!
* Initialises the DB API, check the table version and closes the connection.
* This should be called from the mod_init function.
*
* \return 0 means ok, -1 means an error occurred.
*/
LM_ERR("you have to set the db_url module parameter.\n");
return -1;
}
LM_ERR("can't bind database module.\n");
return -1;
}
LM_ERR("can't connect to database.\n");
return -1;
}
if (
||
) {
LM_ERR("during table version check.\n");
return -1;
}
return 0;
}
/*!
* Initialize the DB connection without checking the table version and DB URL.
* This should be called from child_init. An already existing database
* connection will be closed, and a new one created.
*
* \return 0 means ok, -1 means an error occurred.
*/
LM_ERR("can't connect to database.\n");
return -1;
}
return 0;
}
/*!
* Update the variable length after eventual assignments from the config script.
* This is necessary because we're using the 'str' type.
*/
}
/* column names */
/* table version */
;