SQLBraid - Write SQL. Keep TypeScript. Skip the query builder.
by•
SQLBraid is a SQL-first data-access toolkit for TypeScript. Write ordinary SQL with safe binds, typed results, dynamic SQL, transactions, streaming, and codegen—without translating queries into a query-builder DSL.
Replies
Best
Maker
📌
I'm using java and mybatis a lot at my job. I think mybatis's approach is quite suitable when developers are familiar with SQL. You can write almost full possibility of pure SQL while maintain dynamic SQL feature in one statement. You can also preserve type safety without painful manual ResultSet mapping.
But in TypeScript/JavaScript world, there is no library has exact same feature. Type safety, dynamic sql in one statement, avoid painful resultset binding. So, I decided to make new my own library SQLBraid. Its core goal is SQL stays SQL while keep type safety and easy readable dynamic SQL.
It has safe binds via tagged templates, dynamic SQL via '@braid' directive, unified public surface like auto result mapping, transaction, session, streaming, etc. between 6 different database drivers. Also has codegen, LSP for developer experience and convenience.
GPT-6 Astra was my co-pilot for repository-scale engineering, code review, release verification and other one. but SQLBraid itself has no AI runtime dependency
If you are preferring or looking raw SQL approach like mybatis in java, sqlc in golang, sqlx in rust at js ecosystem. Please consider my newborn library and give me feedback
What became possible in your product with Astra that was not practical before?
Maker
Astra made a release-grade multi-database scope practical for a solo maintainer. It helped me trace behavior across the whole repository, resolve cross-driver parity issues, and carry changes through implementation, tests, documentation, and release verification across PostgreSQL, MySQL, MariaDB, SQLite, Oracle, and SQL Server.
The result is a much broader and better-verified compatibility surface than I could realistically maintain alone. SQLBraid itself has no AI runtime dependency.
Replies