ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladislav Pyatkov <vpyat...@gridgain.com>
Subject Re: IN Query
Date Mon, 10 Oct 2016 12:00:08 GMT
Hi,

Try to do it like this

SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(new Object[] {
inParameter.toArray() });

This will by perform, because the method (SqlFieldsQuery.setArgs()) using
varargs.

On Mon, Oct 10, 2016 at 2:47 PM, Anil <anilklce@gmail.com> wrote:

> HI ,
>
> I am trying in query as given the below link and it is not working
>
> https://apacheignite.readme.io/docs/sql-queries#performance-and-usability-
> considerations
>
>
> sudo code :
>
> List<Object> inParameter = new ArrayList<Object>();
> inParameter.add("name0");
> inParameter.add("name1");
>
> String sql = "select p.id, p.name from Person p join table(id VARCHAR(15)
> = ?) i on p.name = i.id";
>
> SqlFieldsQuery query = new SqlFieldsQuery(sql).setArgs(
> inParameter.toArray());
>
> Could you please point me the issue in the usage ?
>
> Thanks.
>
>

Mime
View raw message