[Freeswitch-users] sqlite3 and regex

Antonio asilva at wirelessmundi.com
Wed Nov 28 19:25:09 MSK 2012


Hi,

Coudn't we load just an external extension to sqlite?

for example, to have regular expression support you could load an
external library like "sqlite3-pcre" (available for unbuntu), you can
load from the console interface or directly in sql.

console:
sqlite> .load '/usr/lib/sqlite3/pcre.so

sql in console:
sqlite> select load_extension(''/usr/lib/sqlite3/pcre.so'); 


In fs is not possible, when i try to do it from my lua script i have the
following error:

2012-11-28 17:21:34.196304 [ERR] switch_core_sqldb.c:572 NATIVE SQL ERR
[no such function: load_extension]
select load_extension('/usr/lib/sqlite3/pcre.so');


Since you have already a switch type of db ( core, odbc or pgsql) could
be nice when using core, be able to use a few more functions available
in sqlite?


Thanks,
António






On Fri, 2012-11-02 at 18:03 -0500, Ken Rice wrote:

> No and this wont happen anytime soon... The SQL interfaces for
> FreeSwitch are kept generic as we support more then just sqlite from
> common code and if we did it for sqlite we would have to make sure its
> implemented equally well for postgresql and mysql and mssql and any
> other database someone might want to use via ODBC
> 
> K
> 
> 
> On 11/2/12 3:34 PM, "Scott" <8f27e956 at gmail.com> wrote:
> 
> 
>         "LIKE" notwithstanding, sqlite3 does not have a built-in true
>         regex function; it does allow for a a c-language hook to one.
>         Given fs extensive use of the regex engine and of sqlite3,
>         we're wondering if the hook is already written and rolled.  If
>         so, can the rest of us hook it to our sqlite3 uses (e.g. from
>         dial plan lua sqlite3).
>         
>         With thanks,
>         
>         
>         
>         ______________________________________________________________
>         
>         _________________________________________________________________________
>         Professional FreeSWITCH Consulting Services:
>         consulting at freeswitch.org
>         http://www.freeswitchsolutions.com
>         
>         
>         
>         
>         Official FreeSWITCH Sites
>         http://www.freeswitch.org
>         http://wiki.freeswitch.org
>         http://www.cluecon.com
>         
>         FreeSWITCH-users mailing list
>         FreeSWITCH-users at lists.freeswitch.org
>         http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>         UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>         http://www.freeswitch.org
> 
> 
> -- 
> Ken
> http://www.FreeSWITCH.org
> http://www.ClueCon.com
> http://www.OSTAG.org
> irc.freenode.net #freeswitch 
> 
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> 
> 
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org


-- 

Un cordial saludo / Best regards, 

 _________________________

António Silva

E-mail:asilva at wirelessmundi.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121128/883fd9fd/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list