CLI Shell command
The Tableland CLI comes with purpose built commands, which slightly differs from the convention in other clients.
The Tableland shell is useful for interacting with tables on any chain. It should be familiar to SQL developers and allows for standard SQL queries to be used. For example, the shell allows you to directly write a
CREATE TABLE statement without having to use the
tableland create command; this is also true for mutating and read-only queries.
Running the following command will open up a shell environment to make it easier to interact with the network:
The shell will then open up and resemble the following, allowing for SQL queries to be passed directly:
First, run the command
tableland shell. Once in the shell, you can create tables and make other queries.
Welcome to Tableland
Tableland CLI shell
Connected to local-tableland using 0x70997970C51812dc3A010C7d01b50e0d17dc79C8
tableland>create table cli_demo_table (id integer primary key, val text);
tableland>insert into cli_demo_table_31337_12(val) values ('Bobby Tables');
tableland>select * from cli_demo_table_31337_2;
"val": "Bobby Tables"
ENS support is very experimental; long term support is not guaranteed!
You must specify the
enableEnsExperiment flag, either in your
.tablelandrc file or your flags. You must also specify an
ensProviderUrl, which should use a provider for an ENS compatible testnet or mainnet.
If an ENS text record has a record corresponding to a table, you can use it within a query by wrapping the namespace in brackets and treating it as the table's name. See the
namespace command for more details on how to add tables to ENS.