Tool Center

Database

Connecting to SQLite, PostgreSQL and MySQL databases by name: listing tables, reading their columns, querying read-only, and writing on purpose.

Tool v1.0.0 by kevinnading 2 downloads updated 17 hours ago
A tool runs as your Aworg. It's Python code that loads into your Aworg with the same permissions: your files, your shell, your network. Nothing sandboxes it. Read the files before you install it, and install tools only from people you trust.

Tools

db_connect db_connect.py

Save a database connection under a name and test it, or list the saved ones. Other database tools refer to a connection by this name. URLs: sqlite:///path/to/file.db (relative paths are in the workspace), postgresql://user:password@host:5432/db, mysql://user:password@host:3306/db.

db_describe db_describe.py

Show one table's columns: name, type, whether it may be null, default, and key.

db_execute db_execute.py

Run SQL that changes a saved database -- INSERT, UPDATE, DELETE, CREATE, ALTER, DROP -- and commit it. Several statements may be separated by semicolons; they run together and all are undone if one fails.

db_install_driver db_install_driver.py

Install the driver a PostgreSQL or MySQL connection needs, into this capability's own folder. SQLite needs none. Call it when a database tool says the driver is not installed.

db_query db_query.py

Run a read-only SQL query on a saved connection and get the rows back. The connection is opened read-only, so a query that would change data fails. Use db_execute to write.

db_tables db_tables.py

List the tables and views in a saved database connection.

No description beyond the summary above.