jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller" <thomas.tom.muel...@gmail.com>
Subject Re: Removing Items
Date Thu, 16 Aug 2007 08:36:45 GMT
Hi Mark,

> impact to the users of the API be if setting a property to null DIDN'T
> remove it

> I believe that the API would be more intuitive to most

It would make things a lot more complicated for everybody:

- What would Property.getBoolean and so on return for NULL?
- Would you suggest to add a new property type NULL?
- What would Property.getType return for a property that had a type
and is now NULL?
- What would the type of a property be if it was set to NULL initially?
- Query: You would need to add null handling
  (check for NULL, check for property not set)
- Now we have 4-value-logic (SQL has 3-value-logic):
  You would need to define the logic table for 4 possible cases:
  true, false, value not set, property does not exist
- To make it consistent, you would need to remove the
  'compact value arrays with null' (N.setProperty("P", new Value[]{null}, type))
  What would the type of 'value lists' with all NULLs be?
- Constraints. Currently a property is 'optional'
  Now we have to add a new dimension: 'nullable' or 'not nullable'.
- What would Property.getLength() return for NULL?
- What would Value.toString return for NULL?


View raw message