|
Well, let's say you want to target DB2 (not just on the i) then there are
a number of DB2 drivers, none of which appear to be officially supported,
the most popular one seems to be "ibm_db", however, this doesn't support
the retrieval of metadata from a stored procedure call, which is necessary
if you wish to communicate back to the webservice caller the types and
sizes of the parameters and result set columns. IBM do have a native driver
I think, which I suspect does allow metadata retrieval, but this then means
you have to run your NodeJs server on the IBM i and can't develop it
locally and get all the benefits you get on the PC, like a reloading
development server when the code changes and a nice debugger (I've not
tried using a remote debugger on IBM Node, which might make debugging a bit
less painful). In Java EE, I can develop on my PC in the IDE, run a Tomcat
instance locally and use a local copy of DB2, MySQL or whatever, or even
point to my IBM i just by providing th
e right JDBC driver and connection options - my code stays exactly the
same. This also means that simply by providing different DB connection
resources in TomEE the same webservice can execute SPs on completely
different databases seamlessly.
Coming back to Node, if you look up drivers for SQL Server, for example,
there don't seem to be any officially supported ones. Furthermore, the APIs
for each driver are often completely different so you have to write
specific code for each database, or worse still, driver that you wish to
use. Also, TomEE has a build in database connection pooling facility, in
Node on the other hand, some drivers have it, some not, then you have to
find your own pooling solution.
If anyone knows better or I've missed something obvious I'd love to know,
as I said, I'd prefer to rewrite my framework in Typescript and run it
under Node then I have all the code under one roof as it were, but it just
doesn't seem that straightforward.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.