Introducing Kuneiform: A Language and IDE for Permissionless Databases
Today, we are excited to unveil our next major release to Kwil: The Kuneiform Release. This release is a significant update to supporting permissionless and decentralized SQL databases for the Web3-development stack.
Kuneiform also allows Kwil to support most of the SQL-92 standard. Previously, Kwil only supported basic Insert/Update/Delete operations. With Kwil, you can now execute subqueries, joins, and ad-hoc select statements on databases. This is a massive upgrade for using permissionless databases across large and complex datasets.
Full documentation on Kuneiform can be found here. You can start deploying today (with example databases) at https://ide.kwil.com/.
First, connect your MetaMask wallet and add your tokens to the funding pool. Funds must be approved before they can be deposited. Depositing must wait for 12 block confirmations — so do not be alarmed if it takes a few minutes. You can proceed to do other things in the application while the funding is confirmed.
Next, begin writing in “index.kf”. We can start by declaring the database name and defining the table structures.
Below the tables, you can define actions. Actions are predefined SQL queries that are called once the database is deployed. Actions are similar to smart contract functions — anyone that confirms to the rules of the action can execute the action. You can set actions as public (anyone can execute) or private (only the deploying wallet can execute). More on actions, their syntax, and how to manage access control can be found in the docs.
Once the database is ready, you can toggle to the submit tab (third button on the navigation bar), select the file you want to deploy, compile the file, and then click submit. Remember, you must connect your wallet, and you must have funds in the funding pool before you can deploy your database!
On the last tab, you can select and interact with your deployed databases. This allows you to test the functionality of your database and verify that it behaves as expected. Actions executed in this tab are live and reflected in your database.
With this release, we are also thrilled to launch a revamped JS/TS SDK, a brand new Python SDK, and an upgraded CLI.
The new JS/TS SDK mirrors much of the same behavior as the previous release. Developers will find that the processes for retrieving their schema, listing their database, and adding funds are nearly the same as before. New to this SDK is the ability to call and execute actions (i.e., predefined SQL queries), deploy compiled Kuneiform (which can be exported from the IDE), and execute SELECT queries against public databases. We have also deprecated the DBBuilder class in favor of developers now deploying their databases with Kuneiform. Full documentation on the JS/TS SDK can be found here.
The Python SDK opens a new avenue for developers to interact with Kwil. After our previous release, we found that many data-intensive applications (e.g., data providers, AI, etc.) are built in Python environments. We believe that allowing developers to use Kwil with Python will expand the use cases and audience for permissionless relational databases. The Python SDK contains many similar functionalities as the JS/TS SDK, including the ability to deploy databases, execute actions, and query new databases. Full documentation on the Kwil Python SDK can be found here.
The upgraded CLI now gives developers expanded functionality to interact with their Kwil databases. With this new version, developers and data teams can batch-insert data into their Kwil databases directly from a CSV. In our pre-launch testing, it took only a few seconds on average to insert over 100,000 records into a database. This functionality will allow developers and data teams to quickly and easily migrate their databases to Kwil, requiring little to no changes to their existing schemas.
Following this release, we are excited to continue iterating based on the feedback from our current and future partners. Many thanks to our existing design partners for their help and support in guiding this release’s strategy and development.
Next week, we are excited to co-host Permapalooza, a Consensus 2023 ancillary event with AR.IO. At the event, we will talk more about the technology and vision behind the Kuneiform language, as well as where we plan to grow from here. Permapalooza is a must-attend event for anyone interested in the Permaweb, Web 3.0, and the future of decentralized infrastructure as a whole.