npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ipsql

v1.2.18

Published

Decentralized SQL Database

Downloads

11

Readme

IPSQL

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.

  • Features
    • Traditional SQL CREATE, UPDATE, SELECT, WHERE, etc.
    • Deltas and proofs for every database operation and query.
      • You can replicate the data for only a single query as hash linked blocks.
      • Every mutation creates deltas to prior states and even query deltas can be replicated.
    • Optional Encryption
    • DAG Tables (JSON-like unstructured objects as rows, with column indexing an SQL queries still available)

This project is built using a tree building technique implemented in the chunky-trees module.

CLI

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]

SQL Feature Checklist

  • CREATE
    • [ ] DATABASE (it isn't clear how we would want to implement and support this yet)
    • TABLE
      • [x] INTEGER
      • [x] VARCHAR(size)
      • [x] FLOAT
      • [ ] DATE
      • [ ] TIME
      • [ ] DATETIME
      • [ ] BLOB (should use the FBL, values smaller than 32b will be inline binary, below 1MB should be a single raw block link, anything else is a full tree FBL as a stream)
      • [ ] TEXT (may never support, according to spec this is upt 2GB of string data so it's hard to figure out what the inline vs linking rules would be. Instead, using VARCHAR as the inlined string and BLOB the probably linked type)
  • [ ] ALTER TABLE
  • INSERT
    • [x] ROWS INSERT INTO table_name VALUES ( 'test' )
    • [x] COLUMNS INSERT INTO table_name ( column_name ) VALUES ( 'test' )
  • UPDATE
    • [x] UPDATE SET w/o WHERE
    • [x] UPDATE SET WHERE
  • DELETE
    • [ ] DELETE w/o WHERE (deletes table)
    • [ ] DELETE WHERE
  • SELECT
    • [x] * SELECT * FROM table_name
    • [x] COLUMNS SELECT column1, column2 FROM table_name
    • [ ] ROWID meta column
    • [ ] TOP
    • [x] MIN
    • [x] MAX
    • [x] COUNT
    • [x] AVG
    • [x] SUM
    • [ ] LIKE pattern
    • WHERE
      • [x] AND
      • [x] OR
      • [x] ASC, DESC
      • [x] basic comparison (=, >, <, >=, <=)
      • [ ] <>
      • [ ] GROUP BY
      • [x] ORDER BY
      • [ ] BETWEEN
      • [ ] LIKE
      • [ ] IN
      • [ ] NOT
      • [ ] IS NOT NULL, IS NULL
    • [ ] JOIN
    • [x] ORDER BY
    • [ ] GROUP BY
    • [ ] HAVING
    • [ ] UNION

IPLD Schema

type 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
}