# sqlkata/querybuilder

SQL query builder, written in c#, helps you build complex queries easily, supports SqlServer, MySql, PostgreSql, Oracle, Sqlite and Firebird

Repository: https://github.com/sqlkata/querybuilder
Canonical: https://ross.abutalabs.com/products/querybuilder
Homepage: https://sqlkata.com
Language: C#
License: MIT
License Family: permissive
Topics: sql-query-builder, sql-server, postgresql, mysql, c-sharp, database, query-builder, sql-query, sql, csharp, activerecord, data-access-layer
Last push: 2026-04-10T11:27:35+00:00

## Health v2 (maintenance only)
Score: 68/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 76, release rhythm 40, longevity 100
- inputs: {"age_days": 3404, "days_push": 145, "days_rel": 578, "gap_med": 0, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3379, forks 523 (observed 2026-08-28T04:07:58.585822+00:00)

## What it is
SqlKata is a fluent SQL query builder library for C#/.NET that compiles expressive queries for SqlServer, MySQL, PostgreSQL, Oracle, SQLite, and Firebird. It uses parameter binding to prevent SQL injection and offers an optional Execution package with Dapper for running queries.

## Use cases
- build dynamic sql queries in c#
- write database-agnostic queries across sql server and postgres
- prevent sql injection with parameter binding
- compose complex queries with joins and subqueries in dotnet
- execute queries with dapper in .net
- build a data access layer without a full orm

## When to choose
- you want a lightweight alternative to full ORMs like Entity Framework
- you need to target multiple database vendors with one query API
- you prefer writing SQL-like fluent code with full control over the query
- you need safe parameterized queries without manual string building

## When to avoid
- you want automatic migrations, change tracking, or entity mapping from schema
- your project is not on the .NET platform
- you need a NoSQL or ORM-style repository abstraction

## Facets
- artifact type: library
- maturity: stable
- function: database, orm, database-driver
- domain: databases, backend, web-development, developer-tools
- platform: dotnet, cross-platform
- tags: sql-query-builder, query-builder, csharp, sql-injection-protection, multi-database, dapper, fluent-api, data-access-layer

## Member repositories
- sqlkata/querybuilder (main) score 68

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:58.585822+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:39:41.915786+00:00, confidence not recorded.
  - readme: https://github.com/sqlkata/querybuilder (fetched 2026-08-28T04:07:58.585822+00:00, sha 231cfaf83309)
  - homepage: https://sqlkata.com (fetched 2026-08-29T09:33:21.566312+00:00, sha b4dac43c5d33)
  - site_page: https://sqlkata.com/docs (fetched 2026-08-29T09:33:21.569095+00:00, sha be771bb53c61)
  - site_page: https://sqlkata.com/release (fetched 2026-08-29T09:33:21.570926+00:00, sha 82e66c30124e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
