select * from test('a', 'b', 'c');

I am passing 3 Strings and try to log how many arquments got passed to
my function:

Logger.getAnonymousLogger().info("" + args.length);

there is no more code

Compile this java class
public class Test {
        public static ResultSet test(Connection c, String... args)
throws
Exception {
                Logger.getAnonymousLogger().info("" + args.length);
                //
Logger.getAnonymousLogger().info(StringUtils.getStringOf(args));
                return null;
        }
}

create the alias test for 'Test.test';

open a web console

do a select * from test('a', 'b', 'c');

check your logs, expected 3 got 1 ... hmmm .... ????



create alias for
On 11 Jan., 12:53, Noel Grandin <[email protected]> wrote:
> you need to show more code than that.
> what exactly are you passing into your test method?
>
> On 2012-01-11 13:51, Christian123456789 wrote:
>
>
>
>
>
>
>
> >   StringUtils class is home made and just representing all
> > array,lists,and so on as a string. If I pass 3 arguments I expect to
> > get a log entry of 3
>
> >   >  Logger.getAnonymousLogger().info("" + args.length);
>
> > After a: select * from test('a', 'b', 'c');
>
> > I expect
> > 11.01.2012 12:39:35 Test test
> > INFO: 3<<<<<----- 3

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to