Apache JDO Project - JDO spec section 14.7. SQL queries must start with SELECT

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > November 2005 > JDO spec section 14.7. SQL queries must start with SELECT





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author JDO spec section 14.7. SQL queries must start with SELECT
erik@jpox.org

2005-11-22, 7:45 am

Hi,

Is this still valid? I propose to remove this limitation because we should allow
running stored procedures.

Myself, I need to run a stored procedured. I guess this is a common use case.

Regards,

Erik Bengtson



Craig L Russell

2005-11-22, 5:45 pm

Hi Erik,

The reason for disallowing anything but queries in the SQL statement
is that when using the JDO query facility, the JDO implementation is
expected to understand the effect of the query on the underlying
datastore and to make sure that the user doesn't accidentally hurt
herself. That is, objects deleted or updated in the datastore should
be reflected in the cache visible to the object model. Take a look at
delete by query for the kind of guarantees that JDO provides.

There is no such restriction on operations performed through the
JDOConnection, which is where I expect your stored procedures can
find a home.

Craig

On Nov 22, 2005, at 2:38 AM, erik@jpox.org wrote:

> Hi,
>
> Is this still valid? I propose to remove this limitation because we
> should allow
> running stored procedures.
>
> Myself, I need to run a stored procedured. I guess this is a common
> use case.
>
> Regards,
>
> Erik Bengtson
>
>


Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


erik@jpox.org

2005-11-22, 5:45 pm

Hi Craig,

My procedure only encapsulates a SELECT stmt. The SQL query is far trivial to
use than the JDOConnection.

IMO the usability outweigh the warranty the JDO provides by not updating the
database when running SQL queries.

Regards,

Erik Bengtson

Quoting Craig L Russell <Craig.Russell@Sun.COM>:

> Hi Erik,
>
> The reason for disallowing anything but queries in the SQL statement
> is that when using the JDO query facility, the JDO implementation is
> expected to understand the effect of the query on the underlying
> datastore and to make sure that the user doesn't accidentally hurt
> herself. That is, objects deleted or updated in the datastore should
> be reflected in the cache visible to the object model. Take a look at
> delete by query for the kind of guarantees that JDO provides.
>
> There is no such restriction on operations performed through the
> JDOConnection, which is where I expect your stored procedures can
> find a home.
>
> Craig
>
> On Nov 22, 2005, at 2:38 AM, erik@jpox.org wrote:
>
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>
>





Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com