-
Notifications
You must be signed in to change notification settings - Fork 105
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
Component API #1985
Component API #1985
Conversation
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Co-authored-by: Niels Liisberg <[email protected]> Signed-off-by: worksofliam <[email protected]>
@worksofliam @sebjulliand I think it would be great if the extension would
|
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
@chrjorgensen Per your second point: each component has their own |
Signed-off-by: worksofliam <[email protected]>
Co-authored-by: Niels Liisberg <[email protected]> Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
@codefori/core Any chance I can get a midpoint review on this API changes so far? |
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: Seb Julliand <[email protected]>
Signed-off-by: Seb Julliand <[email protected]>
Signed-off-by: Seb Julliand <[email protected]>
Signed-off-by: Seb Julliand <[email protected]>
|
The cause of the conversion error is when the the call the
|
Niels provided me with an updated https://gist.github.com/NielsLiisberg/cd2350aee85f5b2e967993faf7ea7595 |
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
This PR is now open again and ready to be tested. Some questions:
|
@worksofliam Didn't we start using pure SQL to get the line numbers and line dates from members, which CPYTOSTMF does not provide? If people using these are punished performance-wize, so be it. Could be a motivator for moving to streamfiles and git! 😉 |
Right, but we only use CPYTOIMPF on temporary objects in |
Signed-off-by: worksofliam <[email protected]>
I had a bit of chat with Liam, the potential use cases are all best handled by the DB2 for i extension. |
@sebjulliand I have removed (Whoops, I ran the tests without a workspace open!!) ![]() |
Signed-off-by: Seb Julliand <[email protected]>
Signed-off-by: Seb Julliand <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works fine. I fixed a test that failed because Assert.fail
didn't seem to be the right option.
I used the extension normally and it looks OK; I didn't see any issue.
@worksofliam, you can merge if you feel comfortable with it.
Changes
As we increase our dependence on our own SQL tools, I think it was time we added an API to easily add and maintain different services.
As well as that, this PR does another of other things internally:
runtimeCcsid
tojobCcsid
and also addedqccsid
on the IBMi class.IBMiContent
out ofInstance
and into theIBMi
class.IBMi#runSQL
method will, depending on the QCCSID, fetch the data from a CSV using one of two of our new components. This will solve a number of CCSID issues when working with EBCDIC in tables as we read only in UTF8.CPYTOIMPF
if the statement is 'simple' as it is more performant thanSQL_TO_CSV
We fallback toCPYTOIMPF
ifSQL_TO_CSV
fails to installIBMiContent#getTable
now only usesCPYTOIMPF
and does not resolve to SQL when possible. We still use this API to fetch a specific member during the complication process (EVFEVENT file members)Nice to haves
Below are some CCSID related issues which would go along well with this PR:
DSPFD
forobject_statistics
#1992 being implemented to solve some CCSID issues when fetching the object listTo do
SQL_TO_CSV
component, but it does not installIFS_WRITE
component, but it does not installSQL_TO_CSV
depends onIFS_WRITE
)SQL_TO_CSV
Write components to a new dedicated library if availablerunSQL
API usingSQL_TO_CSV
SQL_TO_CSV
ComponentManager
getMemberList
IFS_WRITE
to have aclob
parameter overvarchar
How to test this PR
Examples:
Checklist
console.log
s I added