Erlang/OTP Forums

Author Message

<  Ejabberd mailing list  ~  [patch] use a separate non-compiled queries file for odbc

Guest
Posted: Mon Apr 09, 2007 7:39 am Reply with quote
Guest
Hi all,

We have a requirement to have a separate schema for our jabber server,
so the current odbc_queries.erl file had to be modified to meet our
needs.

I've hacked up a couple of functions that allow us to use a simple
text file to store our queries in and then read the query on the fly
from the text file, instead of having to re-compile ejabberd src when
we changes schemas.

I'm attaching the src code to the email (as I'm currently logged into
windows and don't have the src tree here so cannot svn diff Sad )

I'm sure it could be improved (make the queries file name configurable
in ejabberd.cfg etc), but it works for us and I thought it would make
sense to push it to the mailing list and see if there's any value in
making this the default behaviour.

One thing to note is that the ejabberd_queries.sql file currently
contains @schema@.table etc, this is because we filter this file as
part of our build process and replace the @schema@ with whatever value
we choose.

Thanks,
Kev


Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum