{"id":42877,"library":"ipsql","title":"IPSQL","description":"A decentralized SQL database that runs on IPFS, implementing SQL schema, data model, and query language. Currently at v1.2.18 in pre-alpha stage with heavy active development and frequent breaking changes. Not production-ready. Uses chunky-trees for ordered search indexes and IPLD for data structures. Supports CREATE/INSERT/UPDATE/SELECT with WHERE, ORDER BY, aggregation functions (MIN, MAX, COUNT, AVG, SUM), optional encryption, and DAG tables (JSON-like unstructured rows). Key differentiator: every operation produces deltas and proofs for replication as hash-linked blocks. Does NOT yet support full SQL (e.g., JOIN, GROUP BY, DELETE without WHERE, DATE types).","status":"active","version":"1.2.18","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install ipsql","lang":"bash","label":"npm"},{"cmd":"yarn add ipsql","lang":"bash","label":"yarn"},{"cmd":"pnpm add ipsql","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency for tree building technique used in ordered search indexes","package":"chunky-trees","optional":false}],"imports":[{"note":"CommonJS require is not officially supported; use ESM imports.","wrong":"const ipsql = require('ipsql')","symbol":"IPSQL","correct":"import IPSQL from 'ipsql'"},{"note":"Type is available for TypeScript users. Not a named export in all versions; check docs.","wrong":"","symbol":"Database","correct":"import { Database } from 'ipsql'"},{"note":"Default export is the main object, not a named export called 'ipsql'.","wrong":"import { ipsql } from 'ipsql'","symbol":"default import","correct":"import ipsql from 'ipsql'"}],"quickstart":{"code":"import IPSQL from 'ipsql';\n\nasync function main() {\n  const db = await IPSQL.create('test.db');\n  const createTable = \"CREATE TABLE users (id INTEGER, name VARCHAR(100))\";\n  await db.query(createTable);\n  await db.query(\"INSERT INTO users (id, name) VALUES (1, 'Alice')\");\n  await db.query(\"INSERT INTO users (id, name) VALUES (2, 'Bob'\");\n  const result = await db.query(\"SELECT * FROM users\");\n  console.log(result);\n}\n\nmain().catch(console.error);","lang":"javascript","description":"Creates an in-memory or IPFS-based database, adds a table, inserts rows, and queries all rows."},"warnings":[{"fix":"Wait for stable release or pin a specific commit. Check changelog before upgrading.","message":"API is unstable and changing frequently without notice; do not use in production.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Use 'DELETE FROM table_name WHERE ...' to delete specific rows.","message":"DELETE without WHERE clause deletes the entire table, not all rows.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check the SQL feature checklist in README before writing queries.","message":"Some SQL features like JOIN, GROUP BY, and complex WHERE conditions are not implemented.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Transition to using the Node API programmatically.","message":"The CLI may be removed or changed in future versions as the JS API becomes the main interface.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'activ':28 'aggreg':57 'alpha':24 'avg':62 'block':88 'break':32 'chang':33 'chunki':40 'chunky-tre':39 'count':61 'create/insert/update/select':52 'current':18 'dag':67 'data':13,49 'databas':5 'date':102 'decentr':3 'delet':99 'delta':79 'develop':29 'differenti':75 'e.g':95 'encrypt':65 'everi':76 'frequent':31 'full':93 'function':58 'group':97 'hash':86 'hash-link':85 'heavi':27 'implement':10 'index':45 'ipf':9 'ipld':47 'ipsql':1 'javascript':104 'join':96 'json':70 'json-lik':69 'key':74 'languag':17 'like':71 'link':87 'max':60 'min':59 'model':14 'oper':77 'option':64 'order':43,55 'pre':23 'pre-alpha':22 'produc':78 'product':36 'production-readi':35 'proof':81 'queri':16 'readi':37 'replic':83 'row':73 'run':7 'schema':12 'search':44 'sql':4,11,94 'stage':25 'structur':50 'sum':63 'support':51,92 'tabl':68 'tree':41 'type':103 'unstructur':72 'use':38 'v1.2.18':20 'without':100 'yet':91","created_at":"2026-06-05T16:57:05.744481+00:00","updated_at":"2026-06-05T16:57:05.744481+00:00","problems":[{"fix":"Use 'import IPSQL from 'ipsql' and then const db = await IPSQL.create(...);","cause":"Using default import incorrectly (e.g., import { IPSQL } instead of import IPSQL).","error":"TypeError: db.query is not a function"},{"fix":"Check the SQL feature checklist. JOIN is not yet implemented.","cause":"Attempting to use an unsupported SQL feature.","error":"Error: Not supported: JOIN"},{"fix":"Add 'type': 'module' to package.json or use .mjs extension; replace require with import.","cause":"Using CommonJS require instead of ESM import.","error":"ReferenceError: module is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"ipsql","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}