Re: [gnome-db] Patch for postgres provider



* [ Rodrigo Moya <rodrigo gnome-db org>
* Sat, 09 Mar 2002 01:31:34 +0100 ]
> > +		if (!strcmp (name, "boolean"))
> > +			return GDA_TYPE_BOOLEAN;
> > +		if (!strcmp (name, "int8"))
> > +			return GDA_TYPE_BIGINT;
> > +		if (!strcmp (name, "int4") || !strcmp (name, "abstime") || !strcmp (name, "oid"))
> > +			return GDA_TYPE_INTEGER;
[snip]
> hmm, all those if's should be really nested, shouldn't they? That is,
> why do you need to check against all type names until you find a
> matching one? A simple 'if...else if...else if...) should work.

	Yes, but as the body of the if is just a return it will not
	continue comparing strings.

	Thank you VERY MUCH for all your comments (except the one above
	:-). I'll follow them.





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