IPSQL is a decentralized database that can run in IPFS. It implements the SQL schema, data model, and query language.
This project is pre-alpha and under heavy active development. Do not use in production, breaking changes will land without notice.
The JS API is currently considered internal until the churn in the code base dies down.
This project is built using a tree building technique implemented in the chunky-trees module.
The primary way to interact with IPSQL right now is via the command line. You can install it with
npm or use npx to run it without installing locally.
$ ipsql help
ipsql [command]
Commands:
ipsql query <uri> <sql> Run IPSQL query
ipsql repl <uri> Run local REPL
ipsql create <sql> Create a new database
ipsql write <uri> <sql> Mutate an existing SQL database
ipsql import <subcommand> Import CSV files
ipsql keygen <subcommand> Generate keys for encryption
Options:
--help Show help [boolean]
--version Show version number [boolean]
INSERT INTO table_name VALUES ( 'test' )INSERT INTO table_name ( column_name ) VALUES ( 'test' )SELECT * FROM table_nameSELECT column1, column2 FROM table_nametype Column {
schema &Map
index nullable &DBIndex
}
type Columns { String: Column }
type Table struct {
columns Columns
rows nullable &SparseArray
}
type Tables { String: Table }
type Database struct {
tables Tables
}