12.7. Parameterizable Native Queries
12.7. Parameterizable Native Queries In some situations the teiid_rel:native-query property and native procedures accept parameterizable strings that can positionally reference IN parameters. A parameter reference has the form USD integer , for example, USD1. Note that one-based indexing is used and that only IN parameters may be referenced. USD integer is reserved, but may be escaped with another USD, for example, USDUSD1. The value will be bound as a prepared value or a literal in a source specific manner. The native query must return a result set that matches the expectation of the calling procedure. For example, the native query "select c from g where c1 = USD1 and c2 = 'USDUSD1'" results in a JDBC source query of "select c from g where c1 = ? and c2 = 'USD1'", where ? will be replaced with the actual value bound to parameter 1.