Re: [gnome-db] constraints

On 10/19/06, Stian Skjelstad <stian nixia no> wrote:
On Wed, 2006-10-18 at 20:45 +0200, Vivien Malerba wrote:
> On 10/18/06, Stian Skjelstad <stian nixia no> wrote:
> > Hello everybody
> >
> > I'm fairly new for this project, but I have some questions. What is
> > happening with this thing
> >
> Using this feature, Libgda returns a list of constraints on a table.

I should probably make my own app that uses libgda directly aswell :-p

> >
> >
> > I atleast can't see any foreign keys for instance in emergeant on my
> > mysql database.
> Mergeant uses Libgda's dictionary and does not directly use
> get_schema(GDA_CONNECTION_SCHEMA_CONSTRAINTS). The fect that you don't
> see your foreing keys could come from:
> - your dictionary is not up to date with the database, in which cas
> you should sync it with the database
> - you are using an old version of libgda/mergeant.
> - this is a bug.
> Could you tell me which versions of libgda/libgnomedb and mergeant you
> are using? If you want I can make some tests if you send me at least a
> part of your database structure.

I used the cvs head (like 4-5 days old now), and when I tell mergeant to
sync against the mysql database, I get this:

Implementation missing: database_constraints_update_list() in
gda-dict-database.c line 1167

Yes, some features are still missing... The current implementation
uses PK and FK fields as reported by the TABLES schema query to
maintain the list of constraints; it works but there are some
limitations which will be removed when we use the CONSTRAINTS schema

And no forreign keys is visable. I want to fix the mysql provider to
support mysql 4.x foreign keys, but in order to implement it, I need to
trigger the function that reads them, and it never got hit. Just got the
message above.

Two solutions to make it work now:
1- make sure the TABLES schema query correctly reports PK and FK
fields for MySQL 4.x
2- make sure the CONSTRAINTS schema query reprts them for MySQL 4.x
and modify libgda to use that schema query instead of the TABLES
schema query to maintain the list of constraints.

I suggest you do the first point first (as it's easier and you'll get
an immediate result), and then if you want do the 2nd.



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