Subject | Re: [Firebird-Architect] Re: Java Stored Procedures |
---|---|
Author | Vlad Horsun |
Post date | 2005-10-20T12:17:03Z |
> > > Add to that: a "variant" datatype, so you could do your ownPassing parameters by descriptor (already available in UDF and only
> > > wrapper around "coalesce", for example, would be even more cool.
> >
> > Explain it, please
>
> eg, (totally useless example ;): create a ISNULLTHEN_TRUE function:
>
> create function ISNULLTHEN_TRUE (pin_value VARIANT)
> returns VARIANT
> as begin
> if ((pin_value is null) and (typeof(pin_value) = TYPE_INT))
> then result = 1
> else if ((pin_value is null) and (typeof(pin_value) = TYPE_VARCHAR))
> then result = 'T'
> else result = pin_value;
> end
way in our experimental external engines) can solve this. Only missing
piece is an typeless parameter declaration and probably some internal
engine support (not a big deal, imho)
--
Regards,
Vlad