Re: [gnome-db] Changing a field definition
- From: Murray Cumming <murrayc murrayc com>
- To: Rodrigo Moya <rodrigo gnome-db org>
- Cc: Vivien <malerba gnome-db org>, gnome-db-list <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Changing a field definition
- Date: Wed, 05 May 2004 11:20:58 +0000
On Wed, 2004-05-05 at 11:12 +0200, Rodrigo Moya wrote:
> On Tue, 2004-05-04 at 13:09 +0000, Murray Cumming wrote:
> >
> > > only missing the implementation
> > > on each provider.
> >
> > And gda_connection_create_table() and gda_connection_drop_table()
> > methods, I guess.
> >
> yes, missed those ones, added now.
>
> > I'll try to add the implementations for postgres.
> cool! thanks
>
> >
> > > > add_field_to_table()
> > > > delete_field_from_table()
> > > > modify_field()
> > > >
> > > hmm, I'd like to have a more 'elegant' way of doing it, like doing it
> > > via the data model (both the one returned by get_schema like any
> > > others). This involves more work on the providers, but I think it makes
> > > more sense, given we already have the update_column API in the data
> > > model.
> >
> > Note that we already have vfuncs for update_column(), append_column(),
> > and remove_column() on the DataModel, but there are no implementations.
> >
> yes, right. Do you mean we could not use it then, given we have no implementations?
> What other mechanism can we use?
No, I don't think they are useful, because they are methods on the
datamodel, and I shouldn't have to get some data just to change the data
structure. I was just pointing it out - you might want to remove them or
deprecate them.
I'm still in favour of explicit methods like
gda_connection_change_field_definition(tablename, GdaFieldAttributes).
I'm not sure how well this can actually work because
- I don't know how well the GdaValueTypes map to underlying database
types.
- Changing a field definition will often be slow and lossy, and is
sometimes very difficult - postgres needs us to create a new column,
copy the data across, delete the original, and rename.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]