[OpenSER-Devel] db_berkeley : METADATA_DEFAULTS

Will Quan wiquan at employees.org
Tue Nov 13 12:33:40 UTC 2007


Henning,
Sorry to be vague. Lets consider table 'address', as an example. I 
selected it only because it has 3 columns that have default values.

It has a total of 5 columns, like this:
   id(int) grp(int) ip_addr(str) mask(int) port(int)

The default values for this table are:
   grp -> 0
   mask -> 32
   port -> 0

The remaining columns do not specify a default value, so we fill in 
'NULL' for those.

Thus, the *new* row we would like create would look like this:

METADATA_DEFAULTS
NULL|0|NULL|32|0

So I think the XSL logic would be to always use the default if 
specified; else use 'NULL'.

What do you think?
Will


Henning Westerholt wrote:
> On Tuesday 13 November 2007, Will Quan wrote:
>> Henning,
>> I added the column default values to the module like we discussed (rev
>> 3113).
>> I could use your help in db_berkeley.xsl creating a row like this for
>> each table:
>>
>> METADATA_DEFAULTS
>> val1|val2|
>>
>> Do you have any cycles to throw at this ?
> 
> Hello Will,
> 
> i did not understand exactly how do you would like to have this additional 
> data in the tables.
> 
> We need a mapping from each row to one default value, if specified, e.g.:
> 
> val1 -> default_val1
> val2 -> default_val2
> 
> But as i understand you proposal above, it would be only possible to specify 
> the rows with default values, but not the actual values?
> 
> Perhaps it would be better to include the default values in the 
> METADATA_COLUMNS row? Or use a row like this:
> 
> METADATA_DEFAULTS
> val1|default_val1|val2|default_val2
> 
> What do you think?
> 
> Henning




More information about the Devel mailing list