You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2012/12/28 09:56:13 UTC
[jira] [Commented] (DERBY-5862) There is no way to escape the
special _ and % characters in DatabaseMetaData search strings
[ 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