Re: [gnome-db] Re: Gnome-db todo
- From: Andrew Hill <andru treshna com>
- To: Rodrigo Moya <rodrigo gnome-db org>
- Cc: GDA <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Re: Gnome-db todo
- Date: Tue, 09 Apr 2002 12:33:23 +1200
Rodrigo Moya wrote:
On Sat, 2002-04-06 at 04:20, Andrew Hill wrote:
Hi Rodrigo.
Me, well no others, been working on intergrating bonddb with gnome-db.
I've been a bit preoccupied with other things recently so havn't done a
lot of coding. Anyway, we've been running into a few problems when it
comes to unique ids. Is there a way to get to the unique id for a record
set currently implimented in libgda?.
no :-(
But as it is really needed, let's talk about how to do it. For some
databases (PostgreSQL, Oracle), it seems to be easy when just returning
a table's data. But:
Hmm the difficult problems we create.
* how do you get the unique id of a row returned in a JOIN (SELECT ..
FROM a, b)?
It depends on how the tables are joined and if it is a one to many, many
to one or a many
to many relationship. Normally it would be just the id for the first
table (or the many
in one to many). In a many to many relationship it would be both oids.
At the moment i parse and modify the select statement i get to include
things like
the oid i need. I create the sql string SELECT a.*,a.oid,b.* FROM a,b
WHERE ...
from SELECT * FROM a,b WHERE ...
* what can we do for DBMS's that don't have a ROWID or OID or whatever?
In my initial start i had a structure which just stores a list of
primary keys, and or rowids
and oid's. If the table didn't have a rowid or oid then it would fall
back on using
table ids.
Thats been able to know what the
unique id is, or pg_oid in the case of postgresql, for your current
position in a record set?. and is there a way to work out on an insert
what is the unique id generated for that insert?
no :-(
also, the same thing. We really need it, so how can we do it?
cheers
There is a function for this in postgresql (PQoidValue(recordset)) and .
Problem is i only know postgresql really well. So i'm kinda fussy when
it comes to working how to impliment some of this stuff into other
databases.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]