[Asterisk-Dev] RE: MYSQL application

Kevin Walsh kevin at cursor.biz
Mon Aug 2 18:46:11 MST 2004


Constantine Filin [cfilin at intermedia.net] wrote:
> > While I understand the concern of too many 'vendor' specific
> > implementations, I applaud the inclusion of 'query', 'insert', etc.
> > commands into the asterisk dialplan versus through an AGI.  If the
> > general consensus is to move this into ast_data, then that is good as
> > well, as long as the more useful database functions are not lost in the
> > process. 
> >
> There is no problem if MYSQL is not included in CVS, still I thought if
> this work well for me, then it might work for someone else as well.
> 
> On the subject of developing a single interface to all database from *
> dialplans - what about unix ODBC and commands like
> 	ODBC(Connect DSN connID ...)
> 	ODBC(Query ${connID} resultID ...)
> 	ODBC(Fetch ${resultID} fetchID...)
> 	ODBC(Disconnect ${connID} ...)
> 	ODBC(Clear${resultID}
> would they be generic enough?
> 
ODBC is horribly inefficient.  I wouldn't go near it.  Perhaps a
more generic interface would be better.  Something like the
following:

    SQL(ODBC, Connect, ...)
    SQL(MySQL, Query, ...)

The various "database drivers" could be implemented as loadable
modules, much like the codecs and applications etc.

Of course, that wouldn't be very much different from MySQL(...),
but at least it wouldn't complicate the dialplan with an extra
command for every database vendor.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/




More information about the asterisk-dev mailing list