{"id":43985,"library":"sqloflow","title":"sqloflow","description":"Early-stage SQL visualization library for generating data flow diagrams from SQL queries. Current stable version 0.1.4, released August 2024, with monthly or slower cadence. Supports multiple output formats (Mermaid, ASCII, GraphViz DOT, JSON), schema inference, and column-level tracking. Differentiates via detailed flow diagrams rather than simple AST trees, works as CLI and library with browser compatibility.","status":"active","version":"0.1.4","language":"javascript","source_language":"en","source_url":"https://github.com/rot1024/sqloflow","tags":["javascript","typescript"],"install":[{"cmd":"npm install sqloflow","lang":"bash","label":"npm"},{"cmd":"yarn add sqloflow","lang":"bash","label":"yarn"},{"cmd":"pnpm add sqloflow","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"SQL parsing backend","package":"node-sql-parser","optional":false}],"imports":[{"note":"ESM-only package; no CommonJS require support.","wrong":"const parse = require('sqloflow')","symbol":"parse","correct":"import { parse } from 'sqloflow'"},{"note":"Named export, not default.","wrong":"import sqloflow from 'sqloflow'","symbol":"convert","correct":"import { convert } from 'sqloflow'"},{"note":"CamelCase render function, not PascalCase.","wrong":"import { Render } from 'sqloflow'","symbol":"render","correct":"import { render } from 'sqloflow'"}],"quickstart":{"code":"import { parse, convert, render } from 'sqloflow';\nimport { readFileSync } from 'fs';\n\nconst sql = readFileSync('query.sql', 'utf8');\nconst parsed = parse(sql);\nconst dot = convert(parsed, { format: 'dot' });\nconst output = render(dot, { format: 'dot' });\nconsole.log(output);","lang":"typescript","description":"Parses a SQL file, converts to DOT format, and renders the diagram string using sqloflow library."},"warnings":[{"fix":"Use parsed.ast instead of parsed directly when passing to convert().","message":"parse() returns an object with an 'ast' property, not the AST directly.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use format 'dot' or 'json' for reliable output, or check Mermaid version compatibility.","message":"render() with format 'mermaid' may produce Mermaid that is not fully compatible with all Mermaid renderers (e.g., missing node IDs).","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Use npx sqloflow to avoid path issues.","message":"CLI `sqloflow` command may conflict with global installs of other tools named `sqloflow` (unlikely). Prefer `npx sqloflow`.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use explicit column lists in SQL for best results.","message":"Schema inference may be inaccurate for queries without explicit column references (e.g., SELECT *).","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Ensure your SQL dialect is one of the supported ones; for others, parse may fail or produce incorrect output.","message":"The library does not support all SQL dialects; only postgresql, mysql, sqlite, mariadb, transactsql are supported via the '-d' flag or 'dialect' option.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.1.4':19 '2024':22 'ascii':33 'ast':52 'august':21 'browser':60 'cadenc':27 'cli':56 'column':41 'column-level':40 'compat':61 'current':16 'data':10 'detail':46 'diagram':12,48 'differenti':44 'dot':35 'earli':3 'early-stag':2 'flow':11,47 'format':31 'generat':9 'graphviz':34 'infer':38 'javascript':62 'json':36 'level':42 'librari':7,58 'mermaid':32 'month':24 'multipl':29 'output':30 'queri':15 'rather':49 'releas':20 'schema':37 'simpl':51 'slower':26 'sql':5,14 'sqloflow':1 'stabl':17 'stage':4 'support':28 'track':43 'tree':53 'typescript':63 'version':18 'via':45 'visual':6 'work':54","created_at":"2026-06-05T17:02:25.880573+00:00","updated_at":"2026-06-05T17:02:25.880573+00:00","problems":[{"fix":"Install package with 'npm install sqloflow' and use ESM import syntax.","cause":"Package not installed or import path incorrect in ESM context.","error":"Error: Cannot find module 'sqloflow'"},{"fix":"Change to 'import { parse } from \"sqloflow\"' and ensure project uses ESM (e.g., type: module in package.json).","cause":"Using CommonJS require instead of ESM import.","error":"TypeError: (0 , sqloflow.parse) is not a function"},{"fix":"Use a supported dialect: postgresql, mysql, sqlite, mariadb, or transactsql.","cause":"Unsupported SQL dialect.","error":"Error: No SQL parser found for dialect 'bigquery'"}],"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":"https://github.com/rot1024/sqloflow#readme","github":"https://github.com/rot1024/sqloflow","docs":null,"changelog":null,"pypi":null,"npm":"sqloflow","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}}