db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5862) There is no way to escape the special _ and % characters in DatabaseMetaData search strings
Date Fri, 28 Dec 2012 08:56:13 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13540398#comment-13540398
] 

Knut Anders Hatlen commented on DERBY-5862:
-------------------------------------------

Another alternative to adding new internal syntax:

CASE WHEN ? THEN tablename LIKE ? ESCAPE ? ELSE tablename LIKE ? END

ps.setBoolean(1, escape != null);
ps.setString(2, pattern);
ps.setString(3, escape);
ps.setString(4, pattern);

It's a bit ugly, but at least the ugliness will be isolated in metadata.properties/EmbedDatabaseMetaData
and not affect the SQL parser/compiler.
                
> There is no way to escape the special _ and % characters in DatabaseMetaData search strings
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5862
>                 URL: https://issues.apache.org/jira/browse/DERBY-5862
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.10.0.0
>            Reporter: Rick Hillegas
>              Labels: derby_triage10_10
>
> And DatabaseMetaData.getSearchStringEscape() returns an empty string. We should add a
way to configure a search string escape character. See the discussion on this email thread:
http://old.nabble.com/derby-getProcedureColumns-td34176144.html#a34176144

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message