ScottLogic / kdb-boothroyd

a prototype re-implementation of KDB Studio using JavaScript and Electron
Apache License 2.0
5 stars 2 forks source link

Add element table #16

Closed ihull closed 3 years ago

ihull commented 3 years ago

Tabulated results now use ElementUI table component; resizing and scrolling seems to work correctly.

There is an issue with the Text tab when the results are too large for the pane: the entire pane scrolls, including the tab control, rather than just the results. I have not managed to figure out why, or how to fix this.

ihull commented 3 years ago

Commit 8a8f1aa: date and time columns weren't being displayed, because node-q returns them as JS Date objects. In order to format correctly as strings, I have needed to inspect the data to figure out whether it represents a date, time or datetime; then convert this to an appropriate string.

ColinEberhardt commented 3 years ago

The addition of Element UI Table looks good, merged via #17

Regarding https://github.com/ScottLogic/kdb-studio-2/pull/16/commits/8a8f1aac9f6ecebbc3876f769e23730722540cf5 - this is going to get very expensive for large datasets! I think it would be better to extend node-q so that it provides the underlying q types alongside the JS equivalents. You can see where this happens in the node-q code:

https://github.com/michaelwittig/node-q/blob/d4c075cb9dee4aa4f7383c3a5bee373748c1d734/lib/c.js#L262-L323

Perhaps a job for a later date!