The CLI is great, but most SQL command line tooling is shell based #238
Replies: 4 comments 3 replies
-
Big plus one, lots of potential for fun ideas here! I like the idea of enabling dynamic changing the Validator you're connected, but my intuition here is that the shell would remain agnostic on network. As a use-case, once I connect to a Validator (
or something like
Maybe typing just |
Beta Was this translation helpful? Give feedback.
-
@carsonfarmer do you have thoughts here related to your research / usage of the CLI? |
Beta Was this translation helpful? Give feedback.
-
I think this is certainly a useful feature! There are some things to consider:
That is actually not the case yet. Since we don't have access to the AST from JS-land yet (see tablelandnetwork/go-sqlparser#13) we don't have a way to differentiate the statement types. So that would be something we'd beed to figure out first. Once we have that, everything else can for sure be done. With this work now in tablelandnetwork/js-tableland-cli#84, I think things like wallet selection etc is totally doable. With all of that in mind, I'm wondering if there is any way we can leverage an existing SQL shell? For instance, it could be possible to create a tableland VFS for SQLite that might make it possible to use Tableland locally from _within_SQLite? |
Beta Was this translation helpful? Give feedback.
-
Something to look at: https://github.com/isaac-mcfadyen/d1-console |
Beta Was this translation helpful? Give feedback.
-
Most DB drivers have an interactive shell. This allows the user to "just type SQL" (or mongo or whatever) without having to prepend statements with a command like
tableland create | write | read
.With https://github.com/tablelandnetwork/wasm-sqlparser now available, we can determine if statements are creates, writes, or reads and target to correct RPC method / contract function.
Have a shell almost means you get state. This opens the door to dynamically switching between networks, e.g., type something like
use chain ethereum
,use validator <url>
, etc.Some other ideas off the top of my head:
While these state-related ideas would be fun to explore, I think "just type SQL" is compelling enough on its own to want a shell.
Beta Was this translation helpful? Give feedback.
All reactions