Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#65 MiddleKit support for PostgreSQL attached

closed-fixed
MiddleKit (4)
5
2004-10-07
2004-03-08
Benno Rice
No

The attached files implement PostgreSQL support for
MiddleKit. There are several issues however:

- PostgreSQL requires that transactions be committed.
I would suggest adding a pre-transaction and
post-transaction method to the SQLObejctServer class
that can be overridden to add transaction support. I
would envisage transactions covering the entirety of a
store.saveChanges() call.
- PostgreSQL (and other databases) do not support
acquiring the primary key of the last inserted row as a
contextless after-the-fact operation a la MySQL. To
work around this I've had to override the _insertObject
method of SQLObjectStore so as to avoid using the
retrieveLastInsertId method. To fix this in the least
intrusive way possible would require passing the
object.sqlTableName() and object.sqlIdName() to
retrieveLastInsertId.

These files have not been heavily tested.

Discussion

  • Benno Rice
    Benno Rice
    2004-03-08

    Support for PostgreSQL in MiddleKit.

     
    Attachments
    • status: open --> closed-fixed
     
  • Logged In: YES
    user_id=173690

    Thanks for your patch and interest in MiddleKit. I didn't
    end up using your code, because I already had a partial
    implementation for this myself. A couple of weeks ago I
    worked at ensuring full test-suite coverage, and have now
    committed full PostgreSQL support for MiddleKit into CVS.