Skip to main content

SQL

SQL

sqlite databases as a service for busy engineers

Getting started

We are a commandline-first service.
The command bsql is the primary interface to manage your account, databases and allows for easy automation.

Once, install the commandline tools:
npm i -g boomsql-cli
Create a subscription and create a sqlite3 database:
bsql login# follow onboarding steps (verify email with code + pay for subscription)bsql create db my-db-name# pick gateway location, ...# There is it: BOOM! your hosted SQLite db is available :-)
Use your sqlite3 database:
# Select your newly created database as defaultbsql use my-db-name
# Create table and insert databsql q "create table t (id text primary key not null, name text);"bsql q "insert into t (id, name) values ('ID', 'name')"
# Or script queries in and pipe json outecho 'select * from t' | bsql q - | jq
# Or start a repl query consolebsql c
Below an example how to connect from your app.

Pricing

  • Yearly 29.95$ to have an active account.
  • Top-up credits according to your traffic & usage.
  • When you go below 10$ credit value, another 20$ is charged to reserve resources.
How does it work?
  • You pay what you use (storage size + total query compute time + bandwidth)
  • The more efficient your code, the less you pay.
  • Create many databases, as long as it remains normal behavior.
  • When you cancel a subscription, any unused credits are refunded.
  • When you have enormous traffic on a database, charged compute units are capped somewhat to the cost of a single lightweight cloud server.

Commands

Some of bsql's functionalities:

  • Create account and setup subscription bsql login
  • Show objects bsql show dbs, bsql show tables
  • Query your databases bsql query or bsql console for a repl
  • Attach and log live queries bsql tail
  • An entrypoint for simple automation bsql q 'select * from t' | jq
  • Pull backups of your sqlite db bsql dump
  • ... and so much more:
    bqsl -h, bsql $cmd -h

Connect from your (serverless) app#

Add dependency to your project
npm i boomsql
Generate a dbtoken which your app can use to connect read/write to that database
bsql create dbtoken [your-db]
Configure app environment
BOOMSQL_TOKEN={{previously_generated_db_token}}
In your code
import { connectDB } from 'boomsql';const { run, get, all, db } = connectDB();
await run(`insert into t (id, name) values (?,?)`, 'anid', 'aname');
const rows = await all('select * from t');