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

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Wed May 18 08:58:08 MST 2005


On Wednesday 18 May 2005 08:29, Brian West wrote:
> > Would you care to actually RUN your code and show me how
> > EXISTS() differentiates between a non-existent key and a value
> > which is simply blank, or are you going to continue to bullshit
> > your way through this exchange?
>
> While I'm not trying to argue with you here.. but you can't "database
> put" from the cli with a value that is empty.. you can with DBPut in
> the dial plan. You shouldn't be able to dbput if the value is empty.
> I see no real value in doing so.  I think Leif's example was a bit
> flawed.. and you're right ISNULL really doesn't do anything.  I think
> fixing the functions to work correctly in the same situation is the
> best bet.  I expect a DB_EXISTS function to return 1 if it exists and
> 0 if it doesn't.. we don't care if it has a value or not in that case
> just that it exists.

Again, you're wrong:

CLI> database get sample key
Database entry not found.
CLI> database put sample key ""
Updated database successfully
CLI> database get sample key
Value:
CLI>

-- 
Tilghman



More information about the asterisk-dev mailing list