On Thursday, May 10, 2001, at 10:22 AM, Kurt Schrader wrote:
> On Thu, 10 May 2001, Eric Dobbs wrote:
>
>> //Insert clauses need only column-value pairs
>> Query q = new Query()
>> .setColumn(tableColumn1,value1)
>> .setColumn(tableColumn2,value2)
>> .setColumn();
>
> I like this idea better than the last one, as it seems cleaner, but I'm
> not clear on why the above code would cause an insert to happen.
The use case for the existing Criteria object is to construct
the Criteria object and then hand it to methods that define the
type of query: doSelect(), doInsert(), doDelete(), doUpdate()
The new query model is proposed to replace the existing Criteria,
so I'm following that use case. I have been toying with the idea
of specifying the type of an SQL query like this:
Query q = new Query(INSERT)
.setColumn(tableColumn1,value1)
...
The doSelect() could confirm that it's been handed a SELECT Query.
Or perhaps the methods could all be replace by doQuery(). Not
sure about the pros and cons of that.
-Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]