Re: [gnome-db] create/drop table.
- From: Bas Driessen <bas driessen xobas com>
- To: Rodrigo Moya <rodrigo gnome-db org>
- Cc: GNOME-DB List <gnome-db-list gnome org>
- Subject: Re: [gnome-db] create/drop table.
- Date: Wed, 26 Jan 2005 22:19:37 +1000
On Wed, 2005-01-26 at 12:42 +0100, Rodrigo Moya wrote:
> On Wed, 2005-01-26 at 20:28 +1000, Bas Driessen wrote:
>
> > Also, we probably need a gda_connection_create_index (and drop) for
> > compound keys. How would those arguments look like, since
> > GdaDataModelColumnAttributes is not a good structure to place them in.
> > Any ideas/thoughts in this area?
> >
> we have the is_key/is_unique fields in GdaColumnAttributes, so callers
> can just set all fields that are part of the key accordingly and the
> provider would just need to create, from that information, the indices.
>
> I know it's more complicated for the provider, but it avoids one extra
> call from the clients.
>
Correct this will work for single indexes, but consider the following
example. I have a table called "Person" with the following fields:
first_name, last_name, e-mail
So using the GdaDataModelColumnAttributes, I can indicate if I want
column "first_name" and/or "last_name" to be an index. What I can not do
is indicate a compound (or composite or multiple column) index. For
example if I want an index on "last_name" and within that a descending
one on "first_name". (I know it doesn't make sense, but just as example)
CREATE INDEX person_01 ON Person (last_name,first_name DESC)
This can not be achieved using th GdaDataModelColumnAttributes structure
in my opion. Anyway, I will try to come up with a solution, but if you
have any advise, let me know. Thanks.
> Apart from that, it makes sense to have the create/drop_index functions,
> for other uses, so, if you want, add them. Only take into account that
> those API additions can only be committed to HEAD, not to the 1.2.x
> branch.
Understood, will stay away from 1.2.x branch apart from bug fixes and/or
minor non-API changes.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]