[
https://issues.jboss.org/browse/TEIID-2177?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-2177:
---------------------------------------
We may generally want to refer to a procedure with native-query metadata as a canned query
or some other term to avoid confusion with the native procedure approach. Also converted
ldap to use the native-query procedure approach. For example:
{code}CREATE FOREIGN PROCEDURE proc (arg1 integer, arg2 string) OPTIONS
("teiid_rel:native-query"
'search;context-name=corporate;filter=(&(objectCategory=person)(objectClass=user)(!cn=$2));count-limit=5;timeout=$1;search-scope=ONELEVEL_SCOPE;attributes=uid,cn')
returns (col1 string, col2 string);{code}
Provides a proc procedure that can pass in who it is not looking for and a timeout. The
advantage over using the native procedure directly is that there are limited security
concerns (depending on the source approach to parameter substitution and how the
native-query is written), no translator properties to configure, and the use of ARRAYTABLE
is unnecessary.
This functionality is now available for:
LDAP, JDBC, JPA, OLAP, and Salesforce.
The substitution logic is also shared for both native-query (canned) procedures and the
native procedure (TEIID-2176) search queries for all translators. The special cases are
native procedures for JDBC don't substitute, since it already supports
preparedstatements and OLAP invokeMdx if called without arguments will not perform
substitution to maintain backwards compatibility with prior release.
We may need to make the application of the substitution logic more uniform - so that it
gets applied in all cases (even non-search where applicable) and/or allow for it to be
turned off.
Also, $int needs to be escaped, rather than just $ - which makes it difficult to just do a
replace on a string to escape it.
Expand native-query support
---------------------------
Key: TEIID-2177
URL:
https://issues.jboss.org/browse/TEIID-2177
Project: Teiid
Issue Type: Sub-task
Components: Misc. Connectors
Reporter: Steven Hawkins
Assignee: Ramesh Reddy
Labels: 8.2, Beta1
Fix For: 8.2
The native-query extension metadata is currently understood only by jdbc. We should add
support in olap, ldap, salesforce, etc.
--
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