[OpenSER-Devel] db_berkeley : METADATA_DEFAULTS

Henning Westerholt henning.westerholt at 1und1.de
Wed Nov 14 09:36:21 UTC 2007


On Tuesday 13 November 2007, Will Quan wrote:
> 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'.

Will,

i finished the implementation of this script, but 've some more questions.
This is for example the row for the location table:

METADATA_DEFAULTS
NO|''|''|''|NULL|NULL|'2020-05-28 21:32:15'|1.0|'Default-Call-ID'|13|'1900-01-01 00:00:01'|0|0|''|NULL|NULL

Is the handling of the string values correct for you? I didn't use the 'NULL' value
for not specified values, as there already exists a NULL type for SQL NULL.

Should i go for the 'NO' tag, or perhaps use 'NIL'? Do you make a difference for
not definied values (the 'NO' in the row above), and values specified with SQL
NULL in the db_berkeley driver?

Cheers,

Henning



More information about the Devel mailing list