SQL in the Global Context

Madhu visited me soon after my post to the forum about named queries and offered an idea to use the Global Context as a cache and layer of abstraction over the query API.

The basic idea would be to provide an 'SQL' zone whereby developers could interact with data using Global Context's get, put, and delete methods. (Is post there?) There was discussion about this between Sai and myself a number of months ago and it was never documented why we let the idea go.

Making use of NamedQueries, internal Global Context URIs would be available to call and cache relational data. For instance:

results = _gc.get('sql://mydb/my-named-query?arg1=hello&arg2&world')

This would be the equivalent of:

arg1 = 'hello'
arg2 = 'world'
data = Manager.create('mydb')
results = data.query('my-named-query', [arg1, arg2])

Issues

Would it be necessary to deal with numbers and dates? Are strings sufficient against JDBC and setObject like we are currently using?

r1 - 02 Sep 2007 - 03:44:30 - brandon
Syndicate this site RSS ATOM
Copyright 2007 © IBM Corporation | Privacy | Terms of Use | About this site