Re: [gnome-db] Re: libgda .... Re: GnuCash page on GO site

Rodrigo Moya wrote:

On Sun, 2004-03-07 at 21:47 +1300, Dru wrote:

Linas Vepstas wrote:
On Thu, Mar 04, 2004 at 07:00:10PM +0100, Rodrigo Moya was heard to remark:

On Thu, 2004-03-04 at 11:11 -0600, Linas Vepstas wrote:

The API that we use for database acesss is "QOF".
yes, but then, QOF, what does it use to directly access the DB? native
postgres/mysql libraries? odbc?
Yes. The xml data access is through a stack-based progressive scanner
build on top of libxml. Its overkill for out needs, it was really meant for xml-rpc-like parsing which is how we were going to make QOF be network-distributed.
We don't support mysql because mysql doesn't have the features
that we need.
ODBC was designed by a moron who doesn't know C programming.
ODBC is a great example of how not to design an API. is great for low-level bits-n-bytes access to sql db's. Its easy-to-use, small, fast, well-designed. A great example of how to design a low-level API correctly.
If libgda is using native postgres/mysql api's for its server
providers, you might want to look at using libdbi if you haven't done so. It does everything the native libpg does, and it has drivers for other sql db's too. I dunno, I have not really used
libdbi extensively yet, it may have faults I haven't discovered.


libdbi is missing same features as libgda. ie. getting last id of inserted record and been able to get detailed field attributes.

right, getting the last insert_id is missing. It should be possible
though, when working with models in libgda 1.2, to get it, since the row
will be added to the model and then you can access the field in the
newly inserted row.

Won't work if you're just issuing a INSERT command, so we should
probably add it. Could you please add a bug to I'll
take care of it for libgda 1.2 ASAP.

you know i want insert_id feature so i can impliment bonddb objects to be able to access newly insert rows. i can work around it by getting primary key values before insert and doing a select on that.
Sounds like you implimenting something similar to DbObject in bonddb.
2 little things its i'm still stuck on. one insert/update statements effects another select statement in memory, knowing that hte other select statements values haev now changed. Complicated by cross table select statements. I written most of code to fix this but its still tricky to deal with. The other tricky thing is dealing with multi user updates and cascading results back though gui, but i think you may have more progress here. Have you implimented caching yet? The write ahead caching i found a bit difficult at first. As was dealing with states of objects like am i a new value or an edited value or a newly create record needing insertion or a new record just inserted being edited etc. and being able to mark values as changed or not or making the object as changed so you know when to save the object or not.
Heres api on how i currently implimented by DbObjects.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]