Kwon, Chan Young wrote: > I am implementing new DB API for new Database according to DB API 2.0. (as > C-Extension) > There is no specification about LOB in DB API 2.0 > Especially, I need LOB object for piecewise LOB writing/reading after query > execution. > So I defined my own LOB object. > I tried to make simple and easy interface for LOB. >
BLarge OBject's (BLOBs) are alluded to in pep 249 BUT they really are not detailed so I think you have spotted a weakness in the spec. CLOBs (Character Large OBjects) are not covered at all. Locators are not discussed but implied by references to bufferobjects. For BLOBs as input bind parameters check out the Binary() constructor (case sensitive) at http://www.python.org/dev/peps/pep-0249/. For BLOB results look for bufferobject in http://www.python.org/dev/peps/pep-0249/ The spec (as I read it) really expects LOBs to be handled as one massive block. However implementators can choose to implement locators behind the scene so that data isn't sent across the wire unless the buffer object is read from. So, model your LOB access methods on bufferobjects and you should be all set! Marc-Andre reads/responds to the list regularly so take note of any suggestions he has :-) Hope that helps get you started. Chris _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig