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

Extract to (react) package? #42

Open
danthegoodman1 opened this issue Aug 29, 2023 · 4 comments
Open

Extract to (react) package? #42

danthegoodman1 opened this issue Aug 29, 2023 · 4 comments

Comments

@danthegoodman1
Copy link

danthegoodman1 commented Aug 29, 2023

Would be ideal to extract this to a react package so this could be embedded in other apps.

We could then pass in the metadata about available databases (ideally being able to omit them too), tables, and schema of those tables as JSON into the editor.

The editor, table tree, and results renderer could be separate components as well. Sending the query would also be a separate component.

My intended use case is to use https://github.com/danthegoodman1/icedb as the backing store (where metadata, tables, schema, etc.) is tracked and then use ClickHouse/CHDB as the query engine. This means that the tables and schema would not be coming from clickhouse.

@danthegoodman1
Copy link
Author

I see it's made in ace editor, but it seems like codemirror might be more friendly to custom keywords for auto completion (that's what the Stripe Sigma web query editor uses)

@danthegoodman1
Copy link
Author

I worry it might be faster to ground-up rebuild at that point :/

@lmangani
Copy link
Contributor

perhaps we should be thinking about a shared tool between icedb/chdb/etc?

@danthegoodman1
Copy link
Author

@lmangani yeah, I think breaking it down into components too would be best. For example I really just need the syntax highlighting and completion.

https://github.com/tunnelvisionlabs/antlr4ts and https://github.com/ClickHouse/ClickHouse/tree/master/utils/antlr combined with adding the list of supported clickhouse functions would be a stellar combo

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

No branches or pull requests

2 participants