Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Latest commit

 

History

History
18 lines (17 loc) · 952 Bytes

README.md

File metadata and controls

18 lines (17 loc) · 952 Bytes

examples

  • test_db.kf - a simple database schema.
  • test_db.json - json representation of the schema.
  • lifecycle.py - shows how to use kwil.py to deploy a database, execute actions, and query data.
  • tasks.py - shows how to use kwil.py and invoke to interact with Kwil. You'll need to configure KWIL_PROVIDER and KWIL_CLI_PRIVATE_KEY environment variables to run this example.
    • invoke -l list all tasks
    • invoke list-dbs list all databases
    • invoke create-user -a 22 -i 1 -u yaiba create a user
    • invoke create-post -i 1 -t hello -c "how i made this shit" create a post
    • invoke list-posts -u yaiba
    • invoke delete-post -i 1
    • invoke list-posts -u yaiba
    • invoke list-users
    • invoke query -q "select * from users"
    • invoke query -q "select * from postss"
    • invoke drop -d testdb
    • invoke list-dbs