[teiid-issues] [JBoss JIRA] (TEIID-5014) Unable to use parameterized query with node pg module and Teiid/JBoss VDB
Johnathon Lee (JIRA)
issues at jboss.org
Wed Oct 11 09:16:00 EDT 2017
[ https://issues.jboss.org/browse/TEIID-5014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Johnathon Lee updated TEIID-5014:
---------------------------------
Fix Version/s: 8.7.13.6_2
> Unable to use parameterized query with node pg module and Teiid/JBoss VDB
> -------------------------------------------------------------------------
>
> Key: TEIID-5014
> URL: https://issues.jboss.org/browse/TEIID-5014
> Project: Teiid
> Issue Type: Bug
> Components: ODBC
> Affects Versions: 8.7.11.6_2
> Environment: Teiid runtime 8.7.11
> JBoss Data Virtualization 6.10
> NodeJS 6.9.4
> node pg 6.4.1
> Mac OSX 10.11.6
> Reporter: Brian M
> Assignee: Steven Hawkins
> Fix For: 10.0, 8.12.x-6.4, 8.7.13.6_2, 9.2.6, 9.3.3, 8.12.13.6_3
>
>
> When using node pg 6.4.1 in a node application to connect to a JBoss VDB with Teiid, we are unable to successfully return data with a parameterized query.
> Example from node js application (failure):
> client.query("SELECT * FROM records WHERE recordType = $1", ['TYPE1'], function(err, result) { done(); })
> The above code will actually retrieve rows of data, but the connection will be terminated unexpectedly from the JBoss side, thus resulting in a failure. We can confirm though that the parameter is properly inserted into the variable, and rows of data can be retrieved without issue.
> Also, we have confirmed that when sending a static query, we are able to successfully return data without JBoss terminating the connection. We found this approach from the Teiid blog: http://teiid.blogspot.com/2013/02/access-teiid-from-nodejs.html
> Example from node js application (success):
> client.query("SELECT * FROM records WHERE recordType = 'TYPE1'", function(err, result) { done(); })
> Is there something different about a parameterized query vs. a static query that may cause this issue?
> Are you aware of other individuals who have successfully used parameterized queries with the node pg module and Teiid/JBoss VDB?
> Is it possible that how the ODBC settings for Teiid are configured may have an impact on parameterized queries vs. static queries?
> Link: https://teiid.gitbooks.io/documents/content/client-dev/ODBC_Support.html
> Thank you so much for all your help!
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the teiid-issues
mailing list