wbDOMData Extender(Beta 6/6)

Started by JTaylor, February 22, 2021, 08:12:03 AM

Previous topic - Next topic

JTaylor

Since I can't seem to help myself I have added the ability to work directly with CSV files, sort of as if they were 2 dimensional associative arrays (not sure if that is the best description).   You can load a CSV file and then read/alter cells and columns based on either a numerical index and/or the column/row values of the first column/row.   Not sure if this was a great idea or a big waste of my time but guess we will see  :)

      http://www.jtdata.com/anonymous/DomData.zip

Jim

stanl

Quote from: JTaylor on February 22, 2021, 08:12:03 AM
  Not sure if this was a great idea or a big waste of my time but guess we will see  :)
Jim


If order is important this will be significant [at least for me]. Working now with column-wise tables in Hana/SAP db... order is important, as opposed to Access/SQL Server where column name, regardless of order is OK. This, of course, mainly associated with importing csv into tables. When I get time I will upload a test case.

JTaylor

I have just uploaded an update which includes some additional functions I forgot.  I can also include the ability to insert rows and columns if that would be useful.  Need to get back on other work at the moment though.

   http://www.jtdata.com/anonymous/DomData.zip

Jim

kdmoyers

This looks much tighter and almost certainly faster than my sloppy hacks.
Nice stuff Jim, thanks, again!
The mind is everything; What you think, you become.

JTaylor

Thanks.   I also tweaked the other CSV related stuff when adding this part.   Not sure if it will be faster but should be more stable and fault tolerant.

Also, I think I've reached a milestone.  I now spend more time trying to fix stupid mistakes than I do trying to figure out how to do what I want.   :)

Jim

JTaylor

Added Insert options.  Probably done unless I get a request or find a bug.

     http://www.jtdata.com/anonymous/DomData.zip

Jim

JTaylor

Apologies for any hassle but I decided I didn't like having Remove and Insert abbreviated so changed those function names.

       http://www.jtdata.com/anonymous/DomData.zip


Jim

kdmoyers

Right now is the best time to change stuff like that! (smile)
The mind is everything; What you think, you become.

JTaylor

I will mention this now so I don't have to track down this text later.

With the next version of the Extender, if you are using Winbatch version 2021B it will, by default, return a Map for related functions.   You MUST set a parameter to get the Map-compatible string instead. This is a required option if using a version prior to 2021B.  I realize this will be a breaking change.  Hopefully this doesn't create anything more than an inconvenience for folks but it seemed like the most forward-thinking approach.   If upgrade costs were prohibitive I might of gone a different route but since that isn't the case I opted for what seemed best going forward.   


Jim

JTaylor

Hopefully I have covered all the bases.   This version contains the previously mentioned changes regarding Maps.  Thanks again to Tony for the awesome addition to the SDK.   Since I was breaking stuff I went ahead and changed all but one of the Function names for those returning Maps.  See the Help file.  There are a very few where I did a little more than just remove "Map" from the name.   When I first added the Map functions I was thinking of them as being in addition to other return lists.  As I implemented the new Map option I realized all my list functions returned Maps (except one which I removed) so didn't see the point in having the word Map in the function name.  Again, apologies for the hassle.  I left the one in the SQLite extender alone since I already "released" that extender.   I will give it a short time to settle but I think I am done with this one unless someone tells me differently and will make it official in a week or two.

        http://www.jtdata.com/anonymous/DomData.zip

Jim

stanl

It would mean re-writing code, or just sticking with an earlier version. You might consider adding some version info to the .zip.

JTaylor

Assuming we are on the same page with your post....that function is now dmjGetElements().  As mentioned, "Map" has been removed from all the function names except one.  Some, like the one you posted, had an "s" added for clarity.   I plan for this to be my last breaking changes.   If it wasn't for the Extender change I wouldn't have made the function name changes.   Just seemed like a good opportunity for some cleanup once I realized the situation.  Blame Tony ;)

Good suggestion.   I will try to make sure I do that once upon official release and for future changes.

Jim

JTaylor

In order to spare everyone my occasional rant about the AskColor() function as well as to have something to do instead of sleep, I have added one to the Extender.

         http://www.jtdata.com/anonymous/DomData.zip


Jim