{"repo":"productdevbook/sumak","free":true,"listed":false,"github":"https://github.com/productdevbook/sumak","clone":"git clone https://github.com/productdevbook/sumak.git","description":"Type-safe SQL query builder. Zero dependencies, AST-first, hookable, tree-shakeable. Pure TypeScript.","language":"TypeScript","stars":125,"topics":["ast","database","esm","mysql","orm","postgresql","query-builder","sql","sqlite","tree-shaking"],"license":"MIT","category":"databases-storage","readme_excerpt":"sumak Type-safe SQL query builder with powerful SQL printers. Zero dependencies, AST-first, hookable, tree-shakeable. Pure TypeScript, works everywhere. --- Table of Contents - Install - Quick Start - Migrating from kysely or drizzle? - SELECT - INSERT - UPDATE - DELETE - WHERE Conditions - Joins - Expressions - Aggregates - Window Functions - SQL Functions - Subqueries - Set Operations - CTEs (WITH) - Conditional / Dynamic Queries - Raw SQL - ON CONFLICT / Upsert - MERGE - Row Locking - Schema Builder (DDL) - Full-Text Search - Temporal Tables - JSON Optics - Compiled Queries - Query Optimization - Plugins - Hooks - Dialects - Namespaces - Transactions - Executing Queries (Driver) - Migrations - Introspection - CLI - Benchmarks - Examples - Architecture --- Install Quick Start Define your tables and create a typed instance: That's it. db now knows every table, column, and type. All queries are fully type-checked. README conventions Many examples below use col.name , col.price , etc. as shorthand for a column reference. This is documentation shorthand , not an actual import — the real ways to produce a column expression are: - Callback form (recommended): .where(({ name, price }) = ...) — the proxy object exposes a typed Col per column. Most examples can be rewritten this way. - new Col(\"name\") : when you need a column outside a .where() callback (e.g. building an expression for select({ total: op.mul(...) }) ), construct a Col directly: new Col(\"price\") . Where the example u","default_branch":null,"files":null,"tree":[],"storefront":"/r/productdevbook","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/productdevbook/sumak/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}