Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the SQL feature going to be removed from the toolkit? #279

Open
ehenson opened this issue May 7, 2020 · 7 comments · May be fixed by #282 or #320
Open

Is the SQL feature going to be removed from the toolkit? #279

ehenson opened this issue May 7, 2020 · 7 comments · May be fixed by #282 or #320
Labels
keep-open Exempts stale action from auto closing the issue/pr. question Further information is requested

Comments

@ehenson
Copy link

ehenson commented May 7, 2020

As I was studying the master branch it shows that the iSql classes will be removed in the next major release. Is there still going to be support for executing SQL through a rest interface? The reason I am asking is that my applications are running on a Linux server calling into the XMLSERVICE.cgi program.

@ehenson ehenson added the enhancement New feature or request label May 7, 2020
@abmusse
Copy link
Member

abmusse commented May 7, 2020

Yes the iSql class is deprecated and will be removed in v2.x. We are releasing v1.0.0 soon so I expect iSql to still be supported for some time.

We recommend users to migrate to the odbc, idb-connector, or idb-pconnector npm packages. These are much better SQL interfaces for IBM i and should be used instead. In your case, use odbc to connect to Db2 from your linux server. Refer to the odbc setup guide for instructions.

@abmusse abmusse added question Further information is requested and removed enhancement New feature or request labels May 7, 2020
@ehenson
Copy link
Author

ehenson commented May 8, 2020

I do agree with if one wants to query tables outside of the job's QTEMP. What I have been doing is calling a program, it dumps into QTEMP and then I select * from qtemp/table in the same XMLSERVICE call which is fronted by a CL to manage and it also cleans up the QTEMP files. I will have to refactor to return a DS array. This is not a problem to make it is just that it was an easy pattern when working with the senior RPG programmers.

Thank you all for all of the great work with this package!

@ehenson ehenson closed this as completed May 8, 2020
@kadler
Copy link
Member

kadler commented May 8, 2020

As @abmusse said, we plan to support iSql for some time and the SQL capabilities of XMLSERVICE aren't going away so I suppose one could always generate the XML themselves and pass it to the toolkit (or fork the iSql classes/functions if/when needed).

Additionally, you can use the node-odbc transort in the upcoming v1.0 instead of REST. By using the default *here control option for XMLSERVICE, the program should be called in the SQL job so then you could query with odbc instead of iSql.

@ehenson
Copy link
Author

ehenson commented May 8, 2020

@kadler, you bring up a good point. I was too fixed on rest I have forgotten about the odbc option of the connection. Thank you for the hint! I'll do that instead.

@ehenson ehenson reopened this May 8, 2020
@ehenson
Copy link
Author

ehenson commented May 8, 2020

Will you all consider the ability to set an existing opened odbc connection to the odbc transport?
This should should allow me to open a connection, which establishes a job, then I can use the toolkit to make the program call, and finally I can use the same odbc connection to query the QTEMP files.

@kadler
Copy link
Member

kadler commented May 8, 2020

Ahh, right. I forgot that the Node version of this package opens its own connection and closes it every time you call it. I've definitely had that idea, perhaps we can target it for v1.1 or beyond.

@github-actions
Copy link

github-actions bot commented Jun 9, 2020

👋 Hi! This issue has been marked stale due to inactivity. If no further activity occurs, it will automatically be closed.

@github-actions github-actions bot added the stale label Jun 9, 2020
@abmusse abmusse added the keep-open Exempts stale action from auto closing the issue/pr. label Jun 9, 2020
@github-actions github-actions bot closed this as completed Oct 6, 2020
@kadler kadler reopened this Oct 6, 2020
@kadler kadler removed the stale label Oct 6, 2020
@kadler kadler linked a pull request Oct 21, 2020 that will close this issue
@abmusse abmusse linked a pull request Jan 19, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-open Exempts stale action from auto closing the issue/pr. question Further information is requested
Projects
None yet
3 participants