jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: Value types supported by the MicroKernel
Date Thu, 22 Mar 2012 14:04:35 GMT
On Wed, Mar 21, 2012 at 8:26 PM, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> Hi,
>
> The MicroKernel interface currently says:
>
>> supported property types: string, number

that's outdated, it now says:  string, number, boolean

>
> In addition there's explicit support for binary blobs.
>
> For oak-core (see OAK-33 [1]) we'd need a bit more detailed definition
> of the supported value types. A few questions:

the microkernel as currently implemented does not interpret property
value types,
it just stores the value token.

>
> 1) Are boolean values (the "true" and "false" keywords in JSON) also
> supported? It would be nice if they were.

yes

>
> 2) Are null values (the "null" keyword) supported? It would be nice if not.

setting a property to null (e.g. ^"foo":null ) removes it (as in JCR).

however, adding a node with null valued properties is currently possible.
that should probably be fixed.

>
> 3) Are arrays (i.e. "[" ... "]") supported? If yes, are there
> constraints on element types? It would be nice if arrays indeed were
> supported. With the restriction that all elements are scalar values of
> the same type.

it does support arrays but doesn't enforce restrictions.

the microkernel should IMO just support the basic json model.
restrictions should be handled on a higher level.

>
> 4) Are there limits on number values? Most notably, can a number
> that's larger than Long.MAX_VALUE be stored reliably (as a number)?
> Larger than Double.MAX_VALUE? What about things like Double.NaN? Or
> weirder, the other 2^51 NaN values allowed by IEEE754?

whatever you pass in the commit is stored and returned as-is.
as already mentioned, the value is (currently) not interpreted.

>
> 5) Are there limits on string values? For example, can I expect to
> store a string value that's larger than 1MB? Larger than 1GB?

the heap is your limit ;)

>
> 6) Presumably strings are in Unicode. Are characters beyond the BMP
> supported? Is it possible for a string value to contain a Unicode
> non-character, for example U+FFFF?

erm, haven't thought about that. do you think that there could be a problem?

cheers
stefan

>
> [1] https://issues.apache.org/jira/browse/OAK-33
>
> BR,
>
> Jukka Zitting

Mime
View raw message