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

Add JSDO method which returns a list of all tables in the dataset specified by the JSDO object #233

Open
hutcj opened this issue Jan 15, 2019 · 2 comments

Comments

@hutcj
Copy link

hutcj commented Jan 15, 2019

I am implementing JSDO in an Angular project which consumes an OpenEdge PASOE API and displays data for CRUD operations to a web browser with Kendo UI. We have multiple datasets with 2+ tables in them. Does there exist a method or could one be created to enable the Angular developer to programmatically get and use a list of tables contained within the specified endpoint by the JSDO object?

@edselg
Copy link
Contributor

edselg commented Jan 18, 2019

Hello,

We currently do not have a method but it could be added for a future version.

I think that a way to do what you are looking for is to use the jsdo._buffers property. Please notice that this is an internal property and as any internal structure, it is reserved and could change if required.

The jsdo._buffers property points to the table references for the JSDO instance.

If you have a JSDO reference, then you can use Object.keys(jsdo._buffers) to query the tables for the JSDO.

Another alternative would be to work with the internal catalog structure.

Please let me know if this helps you.

@hutcj
Copy link
Author

hutcj commented Jan 21, 2019

Thanks @edselg - I will give this a go! I had initially considered parsing out the catalog .json file manually with an HttpClient object for example, but this seemed like a bit of a hack job approach at best, since that would mean both the JSDO and my http object would interact directly with the service. This seems like a much better idea, even if it's using internal JSDO methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants