Back to browse
OmniQL – One Query Language for PostgreSQL, MySQL, MongoDB, and Redis

OmniQL – One Query Language for PostgreSQL, MySQL, MongoDB, and Redis

by canu21·Feb 13, 2026·2 points·4 comments

AI Analysis

MidBig Brain

Universal syntax sounds neat until you hit MongoDB's document model vs SQL.

Strengths
  • Compiler-based approach generates native queries with zero runtime overhead
  • Handles DDL translation, not just reads—solves schema portability across databases
  • Clean syntax abstraction reduces maintenance burden for polyglot persistence
Weaknesses
  • Impedance mismatch: document stores and relational DBs have fundamentally different query models
  • No evidence of production usage or adoption; abstracting away database differences often creates more problems than it solves
Target Audience

Backend developers managing multi-database platforms

Similar To

Prisma (multi-DB ORM) · TypeORM · Sequelize

Post Description

Hey HN, I built OmniQL — an open-source Go library that compiles a universal query syntax into native database commands.

You write: :GET User WHERE id = 42

It becomes: PostgreSQL → SELECT * FROM "users" WHERE "id" = 42; MongoDB → db.users.find({ id: 42 }); Redis → HGETALL users:42

It's a compiler, not a wrapper. Your query becomes an AST, then translates to native commands. No runtime overhead — it generates the same query you'd write by hand.

Works for DDL too: :CREATE TABLE User WITH id:AUTO, name:STRING:NOTNULL

Becomes native CREATE TABLE for Postgres/MySQL or db.createCollection for MongoDB.

Why I built this: I run a multi-database platform and got tired of maintaining four different query syntaxes. OmniQL started as an internal tool and we're open-sourcing it.

GitHub: https://github.com/omniql-engine/omniql Docs: https://docs.omniql.com

Happy to answer questions about the compiler architecture, AST design, or how we handle the semantic gaps between SQL and NoSQL.

Similar Projects

Developer Tools●●Solid

MCP Storage Map – One MCP Server for MySQL, MongoDB, and Athena

It gives Claude/Cursor-style assistants a single set of MCP actions (query, list_collections, describe_collection) across SQL, NoSQL and analytics stores, and smartly defaults to read-only so you don't accidentally mutate production. Configuration via env vars or the Claude CLI plus an extensible McpConnector interface makes it a pragmatic, low-friction tool for LLM tooling — more adapters, auth examples (IAM for Athena) and docs would push it further.

Solve My ProblemNiche Gem
jeffchoi
103mo ago