|
@@ -14,8 +14,6 @@ Juha Heinanen
|
|
|
|
|
|
tutpro.com
|
|
tutpro.com
|
|
|
|
|
|
-Edited by
|
|
|
|
-
|
|
|
|
Juha Heinanen
|
|
Juha Heinanen
|
|
|
|
|
|
<[email protected]>
|
|
<[email protected]>
|
|
@@ -198,11 +196,29 @@ modparam("mtree", "db_table", "mymtrees")
|
|
|
|
|
|
3.3. mtree (string)
|
|
3.3. mtree (string)
|
|
|
|
|
|
- Definition of memory tree with parameters name, dbtable, type, and
|
|
|
|
- multi. Name is name of the tree, dbtable is name of dbtable where tree
|
|
|
|
- is stored, type is type of tree elements (0 = string, 2 = integer), and
|
|
|
|
- multi tells if dbtable can contain more than one tree (0 = one tree, 1
|
|
|
|
- = more than one tree identified by tname column).
|
|
|
|
|
|
+ Definition of memory tree with using a prameters format string. The
|
|
|
|
+ parameter names can be:
|
|
|
|
+ * name - the name of the tree to be used for referencing inside
|
|
|
|
+ configuration file.
|
|
|
|
+ * dbtable - the name of the database table from where to load the
|
|
|
|
+ records stored in the tree.
|
|
|
|
+ * 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 tprefix.
|
|
|
|
+ When specified, there must be at least two columns. If this
|
|
|
|
+ attribute is not specified, then the global module parameters for
|
|
|
|
+ tprefix and tvalue are used. If more than one value columns are
|
|
|
|
+ specified, the tree will pack the column values in a comma
|
|
|
|
+ separated string, which will be associated with the prefix (string
|
|
|
|
+ transformation {s.select,...) can be used in configuration file to
|
|
|
|
+ extract a specific column value).
|
|
|
|
+ * type - the type of tree elements (0 = string, 2 = integer). It is
|
|
|
|
+ valid only when the (tprefix, tvalue) pairs are loaded (not for
|
|
|
|
+ muti-column values).
|
|
|
|
+ * multi - tells if dbtable can contain more than one tree (0 = one
|
|
|
|
+ tree, 1 = more than one tree identified by tname column). It is
|
|
|
|
+ valid only when the (tprefix, tvalue) pairs are loaded (not for
|
|
|
|
+ muti-column values).
|
|
|
|
|
|
This parameter can be set many times to add more trees in memory.
|
|
This parameter can be set many times to add more trees in memory.
|
|
|
|
|
|
@@ -212,6 +228,8 @@ modparam("mtree", "db_table", "mymtrees")
|
|
...
|
|
...
|
|
modparam("mtree", "mtree", "name=mytree1;dbtable=routes1;type=0")
|
|
modparam("mtree", "mtree", "name=mytree1;dbtable=routes1;type=0")
|
|
modparam("mtree", "mtree", "name=mytree2;dbtable=routes2;type=0;multi=1")
|
|
modparam("mtree", "mtree", "name=mytree2;dbtable=routes2;type=0;multi=1")
|
|
|
|
+modparam("mtree", "mtree",
|
|
|
|
+ "name=mytree1;dbtable=routes1;cols='key1,val1,val2,val3'")
|
|
...
|
|
...
|
|
|
|
|
|
3.4. tname_column (string)
|
|
3.4. tname_column (string)
|