%D \module
%D   [       file=m-sql,
%D        version=2012.07.12,
%D          title=\CONTEXT\ Extra Modules,
%D       subtitle=SQL,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\startmodule[sql]

\ifcase\contextlmtxmode\else
    \registerctxluafile{libs-imp-mysql}{autosuffix}
    \registerctxluafile{libs-imp-sqlite}{autosuffix}
\fi

\registerctxluafile{util-tpl}{}
\registerctxluafile{util-sql}{}

\setupmodule

\doifsomething {\currentmoduleparameter{method}}{
    \ctxlua{utilities.sql.setmethod("\currentmoduleparameter{method}")}
}

\doifsomething {\currentmoduleparameter{server}} {
    \ctxlua{utilities.sql.setserver("\currentmoduleparameter{server}")}
}

\stopmodule
