× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Niels

the wrapper that you are seeking that converts from this to that and back
again will
come as an Open Source powerEXT npm later this year. If you want to
influence it
maybe we should stick our heads together ;-)

On Sun, Mar 25, 2018 at 12:29 AM, Niels Liisberg <nli@xxxxxxxxxxxxxxxxx>
wrote:

Thank you Nathan for the feedback.

Yes! exactly as you state it!

I would wote for an RFE (or post one myself) that makes it possible to set
these options like trimming and defaulting to JSON types in the DB
connection call.

That makes is backward compatible and will not polute the SQL statement you
write. Though we still need some way to map (cast) dates, booleans and
blobs etc. for node.js - and a UDTF will not do the trick: they only work
for “read-only” result sets as you can imagine ( I have been down that
road).

As a node.js developer you still need a wrapper to convert into and from
sqltypes to/from JSON types.

One thought:

You can create SQL types today.

Create type bool as int;

However you can’t create enumerators and theirs domains like

0=false,1=true

So node.js receives the true/false (and even null) but SQL reads and/or
stores the 0 and 1

There is still some plumbing to do and a way to get it simple and right.

The plumbing part is definitely for IBM to do, so we don’t end up with
loads of homegrown frameworks that pretty much do the same.

...does it make sense?

lør. 24. mar. 2018 kl. 18.37 skrev Nathan Andelin <nandelin@xxxxxxxxx>:

Niels,

Could you clarify? Are you suggesting that somebody submit an RFE to have
IBM add new SQL connection settings that implement the desired "trim"
behaviors?

Nathan.


On Sat, Mar 24, 2018 at 9:08 AM, Niels Liisberg <nli@xxxxxxxxxxxxxxxxx>
wrote:

At better solution would be: set the trim option on the connection
since
that is already IBM proprietary . Doing it on the select statement
would
pollute the sql syntax.

Why don't you raise a RFE for both trimming and sql-alike data types in
the
result-set. I think my friend Jesse Gorzinsky would love that.
lør. 24. mar. 2018 kl. 15.52 skrev Henrik Rützou <hr@xxxxxxxxxxxx>:

Nathan

a lazy programmer (and I'm one) is a programmer that dosn't code 100
similar programs from one end to the other - they have fun making a
program generator that then does the job they do not bother to make
;-)

On Sat, Mar 24, 2018 at 3:10 PM, Nathan Andelin <nandelin@xxxxxxxxx>
wrote:

Henrik,

The term "lazy programmer" is sometimes used with negative
connotation,
and
other times used with positive connotation. In this case, I don't
fault
programmers who would rather not code the full SQL statement,
including
rtrim() function calls required to trim fields.

I was just trying to say that this is a case where invoking a REST
web
service API would provide a simpler interface for programmers. A
web-service API would relieve programmers of the verbosity and
ofttimes
complexity of coding their own SQL statements.

I'm just suggesting that this is a case where a REST web service
API
would
have advantages over Node's db2a interface.



On Sat, Mar 24, 2018 at 7:41 AM, Henrik Rützou <hr@xxxxxxxxxxxx>
wrote:

Nathan

you may call it lazy to want to have a transparent interface that
hasn't
to
be
touched every time you add a new or remove a column to a table.

Especially removing a column will cause errors if you specify
resultsets
by specific field names, imho they sould automatically be removed
from
the rest service and that should automatically result in the
field
are
removed
in the UI regardless of code defining the field may exsist.

We are back to constructing an UI where if you filter the SSN
from
UserA
it dosn't appear in his UI but dons't filter it from UserB it
appears -
both running
on the same code.


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.




--
Regards,
Henrik Rützou

http://powerEXT.org <http://powerext.org/>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.

--
Best regards

Niels Liisberg
Chief Software Architect
System & Method A/S
Phone +45 70 20 30 10
Mobile + 45 31 15 88 61
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.

--
Best regards

Niels Liisberg
Chief Software Architect
System & Method A/S
Phone +45 70 20 30 10
Mobile + 45 31 15 88 61
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.