You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Pavel Tupitsyn <pt...@apache.org> on 2018/08/13 10:55:21 UTC

Infer schema name from CacheConfiguration.sqlSchema

Igniters,

For .NET LINQ provider[1] I need to be able to infer SQL schema name from
CacheConfiguration.

Looks like value from CacheConfiguration gets uppercased when not quoted.

So my logic for now is:
 * if config.SqlSchema == null, use config.name
 * otherwise, if config.SqlSchema does not contain double quotes, use
uppercased SqlSchema
 * otherwise, use config.SqlSchema as is

Is it correct or am I missing something?

Thanks,
Pavel
[1] https://issues.apache.org/jira/browse/IGNITE-9116

Re: Infer schema name from CacheConfiguration.sqlSchema

Posted by Pavel Tupitsyn <pt...@apache.org>.
Thanks Vladimir, looks like l have to implement same rules in the LINQ
provider, will do this as part of mentioned ticket.

On Mon, Aug 13, 2018 at 2:25 PM Vladimir Ozerov <vo...@gridgain.com>
wrote:

> Hi Pavel,
>
> You are right, we have some non-obvious rules here, mainly legacy. Please
> see how schema name is constructed here:
> org.apache.ignite.internal.processors.query.QueryUtils#normalizeSchemaName
>
> On Mon, Aug 13, 2018 at 1:55 PM Pavel Tupitsyn <pt...@apache.org>
> wrote:
>
> > Igniters,
> >
> > For .NET LINQ provider[1] I need to be able to infer SQL schema name from
> > CacheConfiguration.
> >
> > Looks like value from CacheConfiguration gets uppercased when not quoted.
> >
> > So my logic for now is:
> >  * if config.SqlSchema == null, use config.name
> >  * otherwise, if config.SqlSchema does not contain double quotes, use
> > uppercased SqlSchema
> >  * otherwise, use config.SqlSchema as is
> >
> > Is it correct or am I missing something?
> >
> > Thanks,
> > Pavel
> > [1] https://issues.apache.org/jira/browse/IGNITE-9116
> >
>

Re: Infer schema name from CacheConfiguration.sqlSchema

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Hi Pavel,

You are right, we have some non-obvious rules here, mainly legacy. Please
see how schema name is constructed here:
org.apache.ignite.internal.processors.query.QueryUtils#normalizeSchemaName

On Mon, Aug 13, 2018 at 1:55 PM Pavel Tupitsyn <pt...@apache.org> wrote:

> Igniters,
>
> For .NET LINQ provider[1] I need to be able to infer SQL schema name from
> CacheConfiguration.
>
> Looks like value from CacheConfiguration gets uppercased when not quoted.
>
> So my logic for now is:
>  * if config.SqlSchema == null, use config.name
>  * otherwise, if config.SqlSchema does not contain double quotes, use
> uppercased SqlSchema
>  * otherwise, use config.SqlSchema as is
>
> Is it correct or am I missing something?
>
> Thanks,
> Pavel
> [1] https://issues.apache.org/jira/browse/IGNITE-9116
>