Kwil v2


Outlined in this section are the types of queries you can conduct on a Kwil database using the SDK.
Through the Kwil SDK, you can write and read data from the Kwil network. For both data writes and reads, you will need to create a Database Interface (DBI). In order to get a DBI, you must select the database and the owner / deployer address.
A DBI contains a mapping of executables, which are functions that are generated from a databases parameterized queries. Executables are identified by the name of the query they are generated from. See the Executables section for more information.
const dbi = await kwil.selectDatabase("0xOwner_address", "database_name")
dbi = DBI {
owner: "0xOwner_address",
name: "database_name",
executables: map<name, executable>
The DBI is needed to execute database interactions. The DBID (dbi.DBID) is needed to identify your database for executing a data read.