Subject | Re: [IB-Architect] New API -- Request for Comments |
---|---|
Author | Jim Starkey |
Post date | 2000-05-31T22:46:52Z |
At 03:18 PM 5/31/00 -0700, Brett Bandy wrote:
virtual bool getAutoCommit() = 0;
virtual void setTransactionIsolation (int level) = 0;
virtual int getTransactionIsolation() = 0;
(OK, I did forget them. I don't approve of autocommit and left
it out of Netfrastructure from which I swiped the code. It's
now in).
Connection::clone() will accomplish almost the same thing. Actually,
in my implementation, it will accompish exactly the same thing.
I'm going to think about the multi-database commit until after I
get something out. I don't think an InterBase only solution is
worth the trouble. I need to re-examine XA and Microsoft's transaction
controller before I propose something.
decremented by release(). When the use count goes to zero, the
object disappears (with appropriate cleanup). Like COM, the
idea is that everyone who copies a pointer initially calls addRef()
then release() when he's done with it. JDBC doesn't need to track
object life times, hence doesn't need addRef/release, and uses
close() to dissociate resources held by an object. I've kept
close() for compatibility (perhap a bad idea?). Close() overrides
the use count and deletes the object forthwith and directly. I'm
not happy with the overlapping mechanisms. What do you think?
and Connection::clearWarnings(). Ever the slave to a standard, I'll
add them.
Thanks for comments.
Jim Starkey
>virtual void setAutoCommit (bool setting) = 0;
>Jim Starkey wrote:
>>
>> Like Jdbc, there is not explicit support for multiple transactions
>> per process. To get them, multiple attachments are required. There
>> is a temptation to add a clone() method to Connection simplify the
>> coding and allow sharing is the InterBase database attachment.
>
>How do you set a transaction's attributes? (ie wait vs nowait, ...)
>
virtual bool getAutoCommit() = 0;
virtual void setTransactionIsolation (int level) = 0;
virtual int getTransactionIsolation() = 0;
(OK, I did forget them. I don't approve of autocommit and left
it out of Netfrastructure from which I swiped the code. It's
now in).
>Is the default trans mode autocommit :)JDBC says default is auto commit. So be it. Yuckola.
>
>Since InterBase supports multiple transactions against a single databaseYes, but I though following the standard was more important.
>as well as a single trans against multiple databases, was there thought
>given to creating a transaction class?
>
Connection::clone() will accomplish almost the same thing. Actually,
in my implementation, it will accompish exactly the same thing.
I'm going to think about the multi-database commit until after I
get something out. I don't think an InterBase only solution is
worth the trouble. I need to re-examine XA and Microsoft's transaction
controller before I propose something.
>>Objects have use counts, born at 1, incremented by addRef() and
>> resultSet->release();
>> statement->release();
>> connection->close();
>
>Could you explain the difference between release and close?
>
decremented by release(). When the use count goes to zero, the
object disappears (with appropriate cleanup). Like COM, the
idea is that everyone who copies a pointer initially calls addRef()
then release() when he's done with it. JDBC doesn't need to track
object life times, hence doesn't need addRef/release, and uses
close() to dissociate resources held by an object. I've kept
close() for compatibility (perhap a bad idea?). Close() overrides
the use count and deletes the object forthwith and directly. I'm
not happy with the overlapping mechanisms. What do you think?
>> catch (SQLException *exception)JDBC (surprise!) has a SQLWarning class, with Connection::getWarnings()
>> {
>> printf ("Query failed: %s\n", exception->getText());
>> delete exception;
>> return 1;
>> }
>
>What about a SQLWarning class for new 6.0 warnings?
>
and Connection::clearWarnings(). Ever the slave to a standard, I'll
add them.
Thanks for comments.
Jim Starkey