Hello,
On 03/05/16 08:18, gmele wrote: > Hello Daniel, > > I add a look to the db_unixodbc and the presence modules. To correct the > ODBC replace query that is visibly not supported by Oracle, I would like to > add a new parameter in the db_unixodbc module : replaceQuery = {0:1}. 0 = > not supported, 1 = supported (default). > > Now, in the presence module, I found this comment : > > if (pa_dbf.replace != NULL) > { > if(pa_dbf.replace(pa_db, db_keys, db_vals, n_query_cols, > 2, 0) < 0) > ... > } > else > { > */* If you use insert() instead of replace() be prepared for > some > * DB error messages. There is a lot of time between the > * query() that indicated there was no matching entry in the DB > * and this insert(), so on a multi-user system it is entirely > * possible (even likely) that a record will be added after the > * query() but before this insert(). */* > if(pa_dbf.insert(pa_db, db_keys, db_vals, n_query_cols )< 0) > > > What will happen if we do inserts only? Will the table grow? Is there a > purge mechanism somewhere? > > Would it be possible in the replace method to do an update and in case of > error, do an insert? > > What is your opinion? > > you can add that parameter to control exporting the replace support - make a pull request on github and it will be merged. Name the parameter replace_query as the other parameters for db_unixodbc use the patterns with underscore and lower cases and format the message as suggested at: - https://www.kamailio.org/wiki/devel/github-contributions#commit_message_format Cheers, Daniel -- Daniel-Constantin Mierla http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users