Re: [gnome-db] create/drop table.
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: bas driessen xobas com
- Cc: GNOME-DB List <gnome-db-list gnome org>
- Subject: Re: [gnome-db] create/drop table.
- Date: Wed, 26 Jan 2005 13:27:16 +0100
On Wed, 2005-01-26 at 22:19 +1000, Bas Driessen wrote:
> 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.
>
you can specify all the fields that are part of the compound key to be a
key, and from that info, the provider can create the compound key.
> 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)
>
yeah, right, that's why we might need the create_index method, for these
cases.
> 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.
>
well, we could add more fields to ColumnAttributes for specifying all
the info, although not sure if it's the best option.
--
Rodrigo Moya <rodrigo gnome-db org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]