# rbock/sqlpp11

A type safe SQL template library for C++

Repository: https://github.com/rbock/sqlpp11
Canonical: https://ross.abutalabs.com/products/sqlpp11
Language: C++
License: BSD-2-Clause
License Family: permissive
Last push: 2026-04-24T08:09:32+00:00

## Health v2 (maintenance only)
Score: 68/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 79, release rhythm 35, longevity 100
- inputs: {"age_days": 4768, "days_push": 131, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2625, forks 361 (observed 2026-08-28T04:07:05.275546+00:00)

## What it is
sqlpp11 is a type-safe embedded domain specific language (EDSL) library for C++ that lets developers define tables and columns as types and construct SQL queries checked at compile time. It includes connectors for MariaDB, MySQL, PostgreSQL, sqlite3, and sqlcipher, though new development has moved to its successor sqlpp23.

## Use cases
- write type-safe SQL queries in C++
- catch SQL syntax and type errors at compile time
- query databases without building SQL strings manually
- map query results to typed C++ structs
- support multiple database backends with one query API
- construct dynamic SQL queries at runtime

## When to choose
- you want compile-time validation of SQL queries in C++
- you prefer typed result structs over string arrays from raw database drivers
- you need a vendor-neutral query layer with pluggable database connectors
- you are maintaining an existing C++ codebase already using sqlpp11

## When to avoid
- you are starting a new C++ project - use sqlpp23 instead
- you need runtime flexibility over strict compile-time checking for most queries
- your project does not use C++11 or later
- you need an ORM with migrations and schema management rather than a query DSL

## Facets
- artifact type: library
- maturity: maintenance
- function: database-driver, orm, database
- domain: databases, developer-tools, backend
- platform: cpp, cross-platform, windows
- tags: sql, edsl, type-safe, query-builder, mariadb, mysql, postgresql, sqlite3, sqlcipher, compile-time-checking, linux, macos

## Member repositories
- rbock/sqlpp11 (main) score 68

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:05.275546+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-30T02:19:51.488826+00:00, confidence not recorded.
  - readme: https://github.com/rbock/sqlpp11 (fetched 2026-08-28T04:07:05.275546+00:00, sha 542064349658)
- Data as of 2026-08-30T08:39:29.467469+00:00.
