Yes, I defninitely looked through your contrib dir, more than once :) About the dir_user_attrs table, I really like the way each attribute maps to the name column without translating between username and id, etc. Though you have an entire table less containing many rows and also have an enabled flag, which I don't. If the attrs never change, perhaps that's the way to go.. I hope with the ${variable} thing that Rupa suggests that it may be possible to configure it either way ? About auto_increment id's, isn't that possible with stored procedures with postgresql ? On Thu, 2009-06-18 at 12:24 -0500, Ken Rice wrote:
Also, you'll have to be VERY careful about auto increment ID fields... What works in MySQL doesn't work on Postgresql...
On Thu, 2009-06-18 at 12:20 -0500, Ken Rice wrote:
Take a look in my contrib directory theres a SQL schema that I am already using w/ mysql and some same data... It might need to be slightly modified for some recent user directory changes, but this works quite well w/ the curl stuff already and my thoughts were to do exactly what you are starting down the road for now...
I don't think its really nessecary to add an additional table for user attribs, where keeping the vars and params split out does since the former are pretty much set by the coders where params and vars can be many and not nessecarily the same everywhere
K
From: Leon de Rooij <leon@scarlet-internet.nl> Reply-To: "freeswitch-dev@lists.freeswitch.org" <freeswitch-dev@lists.freeswitch.org> Date: Thu, 18 Jun 2009 11:48:48 +0200 To: "freeswitch-dev@lists.freeswitch.org" <freeswitch-dev@lists.freeswitch.org> Subject: [Freeswitch-dev] mod_xml_odbc
Hi all,
I'd like to generate user directory xml directly in FS to bypass http +php (or other scripting language) entirely. So I started writing a module to do just that. It's still rough - I don't code c very often - but it works.
http://jira.freeswitch.org/browse/XML-3
Currently all queries are statically defined in the module so users cannot deviate from the sql schema. Bkw suggested to have a look at mod_lcr which look really cool, though I'm not really sure yet how to get the same behavior in this module.
The sql schema (without indexes for readability) currently looks like this:
http://pastebin.freeswitch.org/9427
In the module, I'm doing 7 queries:
Q1: Get domain_id and user_id Q2: Get domain_params Q3: Get domain_variables Q4: Get user_attrs Q5: Get user_params Q6: Get user_variables Q7: Get groups
Where Q2-Q6 should return a list of name/value pairs.
To make things more configurable by the user of the module, I could place all queries in the configuration file, like this:
http://pastebin.freeswitch.org/9426
Do you think that would be acceptable ?
Then I'd remove all code that automatically generates tables (which would make the code a lot cleaner and I won't need to find out how to set auto_increment as it's different for each database).
Are there any other things I should think about ?
Do you think this module could be accepted in FS ? :-)
Thanks for the input !
Kind regards,
Leon
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org