[asterisk-users] Function to query ASTDB families

Olivier oza-4h07 at myamail.com
Sun Sep 13 04:52:11 CDT 2009


2009/9/10 Tilghman Lesher <tlesher at digium.com>

> On Tuesday 08 September 2009 16:33:20 Olivier wrote:
> > Asterisk database is made of <family><key> records such as:
> > fam  key1  val1
> > fam  key2  val2
> > ...
> > fam  key100  val100
> >
> > I'm looking for the smartest way to iterate among different keys
> associated
> > to a given family.
> >
> > One way to do this is to parse "database show fam" response.
> > Is there something smarter ?
> > Something like ${DBKEYS(fam)} which would evaluate to "key1 key2  ...
> > key100".
>
> I think the smarter way, once you've gotten to this level of complexity, is
> to
> start using a real external database, such as Postgres, configure the ODBC
> driver, and use func_odbc to interface to it.


I'm afraid you might be right ...
But being used to read and write so easily in database, is an addiction
which is hard to leave ...


>  AstDB was never meant to be
> such a general purpose database (indeed, queries to it are processed
> serially,
> not in parallel, as in real databases).
>
> --
> Tilghman Lesher
> Digium, Inc. | Senior Software Developer
> twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
> Check us out at: www.digium.com & www.asterisk.org
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090913/2ebf139c/attachment.htm 


More information about the asterisk-users mailing list