On Tue, Jul 28, 2009 at 14:39, Niclas Hedhman<[email protected]> wrote:
> No. Somewhere the Indexing/Querying services are being added. The
> meta-info is required to be added there. BUT, since I think it is
> possible for you to retrieve the ServiceDescriptor after the creation
> of the Model, you can get the MetaInfo object and retrieve the
> NamedQueries and add to it. Note it is not thread-safe.
> Alternatively, you keep the NamedQueries instance around and pass it
> to your assemblers to add their named queries to it. It becomes a
> bootstrap issue...

Will reply to your other email.

>> 2. Named query syntax validation. Can this be done during application
>> startup and if the application is in development mode?
>
> Well, since Sesame doesn't support the equivalent of
> PreparedStatement, the syntax is parsed every time as it is.
> Potentially, we can optimize that parsing by creating the TupleQuery
> early, but that requires the connection to remain open (often not a
> problem, but still needs to be 'handled' for network failures).
> Otherwise, not sure what you are fishing for?

I'm just fishing for being able to validate all handwritten named
query at the start of application.
This will give a huge benefit during development.

>> 3. Is it possible to do this without handwritten the query? e.g. Use
>> query builder API?
>>    e.g. we gained refactoring capabilities. Not error prone and
>> somewhat future proof, e.g. if we're not going for sparql in the
>> future.
>
> Well, this is the regular Query API you want. Named Query support is
> only an additional feature, when the current Query API can't support
> the query given, or for instance when other RDF sources are
> collaborating in the query (which I think is now possible).

Fair enough.

Regards,
Edward Yakop

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to