Modules@robinpath/database
@robinpath/database
0.1.0PublicSQLite database operations for RobinPath automation workflows
@robinpath/database
SQLite database with query builder, transactions, bulk insert, table management, and backup
Why use this module?
The database module lets you:
- Open a SQLite database (file or in-memory)
- Close a database connection
- Run a SELECT query and return all matching rows
- Run a SELECT query and return only the first row
- Execute an INSERT, UPDATE, DELETE, or DDL statement
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/database
Quick Start
No credentials needed — start using it right away:
database.close "mydb"
Available Functions
| Function | Description |
|---|---|
database.open | Open a SQLite database (file or in-memory) |
database.close | Close a database connection |
database.query | Run a SELECT query and return all matching rows |
database.queryOne | Run a SELECT query and return only the first row |
database.execute | Execute an INSERT, UPDATE, DELETE, or DDL statement |
database.insert | Insert a row using an object of column-value pairs |
database.insertMany | Insert multiple rows in a single transaction |
database.update | Update rows matching a WHERE clause |
database.remove | Delete rows matching a WHERE clause |
database.createTable | Create a new table with column definitions |
database.dropTable | Drop a table if it exists |
database.listTables | List all tables in the database |
database.tableInfo | Get column information for a table |
database.count | Count rows in a table with optional WHERE conditions |
database.transaction | Run multiple SQL statements in a single atomic transaction |
database.backup | Backup the database to a file |
Examples
Close a database connection
database.close "mydb"
Run a SELECT query and return all matching rows
database.query "mydb" "SELECT * FROM users WHERE age > ?" 18
Run a SELECT query and return only the first row
database.queryOne "mydb" "SELECT * FROM users WHERE id = ?" 1
Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/database";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
database.close "mydb"
`);
Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/json— JSON module for complementary functionality
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.0 | latest | yesterday |
Related Modules
utilities
1
@dev-tester/hello-world
v2.0.0dev-tester
Updated description
0 downloads
...
utilities
0
@robinpath/apollo
v0.1.1robinpath
Apollo module for RobinPath.
0 downloads
...
utilities
0
@robinpath/archive
v0.1.1robinpath
Create and extract .zip and .tar.gz file archives
0 downloads
...
utilities
0
@robinpath/assert
v0.1.1robinpath
Testing assertions: equal, deepEqual, truthy, falsy, type checks, includes, matches, throws, and more
0 downloads
...
Install
$ robinpath install @robinpath/database Version0.1.0
LicenseMIT
Unpacked Size6.6 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

