Module: kamailio Branch: master Commit: 6260bd810bd6f1f54bbf43c9cc88bb64f4bce83a URL: https://github.com/kamailio/kamailio/commit/6260bd810bd6f1f54bbf43c9cc88bb64...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-02-03T00:02:07+01:00
htable: docs for cols attribute of hash table definition
---
Modified: modules/htable/README Modified: modules/htable/doc/htable_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/6260bd810bd6f1f54bbf43c9cc88bb64... Patch: https://github.com/kamailio/kamailio/commit/6260bd810bd6f1f54bbf43c9cc88bb64...
---
diff --git a/modules/htable/README b/modules/htable/README index 0c2fe41..109a182 100644 --- a/modules/htable/README +++ b/modules/htable/README @@ -11,14 +11,10 @@ Elena-Ramona Modroiu
-Edited by - Alex Balashov
-Edited by - Ovidiu Sas
osas@voipembedded.com @@ -417,8 +413,8 @@ $ kamcmd htable.dump htable
3.1. htable (str)
- The definition of a hash table. The value of the parameter must have - the following format: + The definition of a hash table. The value of the parameter may have the + following format: * "htname=>size=_number_;autoexpire=_number_;dbtable=_string_"
The parameter can be set multiple times to get more hash tables in same @@ -435,6 +431,17 @@ $ kamcmd htable.dump htable expire. * dbtable - name of database to be loaded at startup in hash table. If empty or missing, no data will be loaded. + * cols - the column names of the database table. They must be + enclosed in quotes in order to form a valid SIP parameter value and + be separated by comma. The first column corresponds to key_name. + When specified, there must be at least two columns. If this + attribute is not specified, then the global module parameters for + column names are used. If more than one value columns are + specified, the hash table will pack the column values in a comma + separated string, which will be associated with the key (string + transformation {s.select,...} can be used in configuration file to + extract a specific column value). When cols attribute is present, + writing back to database table is disabled. * dbmode - if set to 1, the content of hash table is written to database table when the SIP server is stopped (i.e., ensure persistency over restarts). Default value is 0 (no write back to db diff --git a/modules/htable/doc/htable_admin.xml b/modules/htable/doc/htable_admin.xml index 42a77fa..44873ac 100644 --- a/modules/htable/doc/htable_admin.xml +++ b/modules/htable/doc/htable_admin.xml @@ -317,7 +317,7 @@ $ kamcmd htable.dump htable <section id="htable.p.htable"> <title><varname>htable</varname> (str)</title> <para> - The definition of a hash table. The value of the parameter must have the + The definition of a hash table. The value of the parameter may have the following format: </para> <itemizedlist> @@ -363,6 +363,22 @@ $ kamcmd htable.dump htable </listitem> <listitem> <para> + <emphasis>cols</emphasis> - the column names of the database table. + They must be enclosed in quotes in order to form a valid SIP + parameter value and be separated by comma. The first column + corresponds to key_name. When specified, there must be at least + two columns. If this attribute is not specified, then the global + module parameters for column names are used. If more than one + value columns are specified, the hash table will pack the column + values in a comma separated string, which will be associated + with the key (string transformation {s.select,...} can be + used in configuration file to extract a specific column value). + When cols attribute is present, writing back to database table + is disabled. + </para> + </listitem> + <listitem> + <para> <emphasis>dbmode</emphasis> - if set to 1, the content of hash table is written to database table when the SIP server is stopped (i.e., ensure persistency over restarts). Default value is 0 (no