[Asterisk-Dev] Loss of functionality with depreciation of DBGet/Put?

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue May 17 14:59:30 MST 2005


On Tuesday 17 May 2005 14:21, Brian West wrote:
> >> ${ISNULL()}
> >> ${EXISTS()}
> >
> > function_db_read() will never return NULL.
>
> Thats right.. EXISTS and ISNULL are just opposites...

I don't think you understand.  The only thing EXISTS and ISNULL can
tell you is whether or not the value passed is the empty string.  We
never pass NULL to either.  Even if we did, the current logic does not
distinguish between NULL and the empty string, therefore it's
completely useless to use to try to distinguish whether the value
existed in the database or not.

Code:
data && *data

Truth table:
		ISNULL		EXISTS
NULL 		1		0
empty		1		0
nonempty 	0		1

Ergo, deprecating DBGet represents a loss of functionality.

-- 
Tilghman



More information about the asterisk-dev mailing list