|Subject||Re: [Firebird-Architect] Re: Java Stored Procedures|
> > > > Add to that: a "variant" datatype, so you could do your ownIf it's not a big deal to create, go ahead ;-)
> > > > 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
> Passing parameters by descriptor (already available in UDF and only
> 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)
I'm asking this - obviously - from a "user" point of view.
You would have to create a way to figure out the actual type of
the parameter in PSQL though.
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Database development questions? Check the forum!