Re: [gnome-db] gdatype_get_[min|max]_value () proposal
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: Juan Manuel Mouriz <jmouriz gmail com>
- Cc: GDA <gnome-db-list gnome org>
- Subject: Re: [gnome-db] gdatype_get_[min|max]_value () proposal
- Date: Wed, 24 Aug 2005 15:55:29 +0200
On Wed, 2005-08-24 at 10:23 -0300, Juan Manuel Mouriz wrote:
> 2005/8/23, Rodrigo Moya <rodrigo gnome-db org>:
> > On Tue, 2005-08-23 at 16:01 -0300, Juan Manuel Mouriz wrote:
> > > I believe that put gdatype_get_[min|max]_value () functions would be a
> > > good idea in order to set spin button alignments for numeric types. If
> > > the type isn't numeric is possible return -1.
> > >
> > > I can write a patch for this?.
> > >
> > this needs access to the providers internals, so it might make sense as
> > part of the provider's methods.
>
> Is really necesary?. I talk about the limits that the GLib system
> imposes over the GDA types. Here a example:
>
> gdouble
> gda_value_type_get_min_value (GdaValueType value_type)
> {
> switch (value_type)
> {
> case GDA_VALUE_TYPE_TINYUINT:
> case GDA_VALUE_TYPE_SMALLUINT:
> case GDA_VALUE_TYPE_BIGUINT:
> case GDA_VALUE_TYPE_UINTEGER:
> return 0;
> case GDA_VALUE_TYPE_TINYINT:
> return -128;
> case GDA_VALUE_TYPE_SMALLINT:
> return G_MINSHORT;
> case GDA_VALUE_TYPE_INTEGER:
> return G_MININT;
> case GDA_VALUE_TYPE_BIGINT:
> return G_MININT64;
>
> ...
>
> case GDA_VALUE_TYPE_GEOMETRIC_POINT:
> case GDA_VALUE_TYPE_MONEY:
> case GDA_VALUE_TYPE_LIST:
> case GDA_VALUE_TYPE_UNKNOWN:
> return -1;
> default:
> g_assert_not_reached ();
> }
>
well, those limits won't be the same for all providers/fields, right?
--
Rodrigo Moya <rodrigo gnome-db org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]