Lightweight review
An open-source C++ library for typed query construction and asynchronous ODBC access.
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Lightweight is an open-source C++23 database library for applications that connect to Microsoft SQL Server, PostgreSQL, or SQLite through ODBC. Its typed query builder composes SELECT, INSERT, UPDATE, and DELETE statements, with joins, filtering, ordering, grouping, and pagination. C++ teams that want database access in their application code, rather than a hosted query service, are its natural audience; it is documented for Windows and Linux.
The query builder is one part of a broader database toolkit. Applications can use raw SQL when builder composition is not a fit, map database rows to C++ records and relationships, and manage versioned schema migrations. Connection pooling is included as well. The async coroutine API offloads blocking ODBC calls to worker threads, which lets teams use an asynchronous interface while working with those drivers. This scope suits projects that want query construction and several database operations in one library, though it is focused on three listed SQL dialects rather than a broad database ecosystem.
Lightweight is self-hosted and open source, so teams integrate the library into their C++ applications and provide the compiler and ODBC drivers it requires. The published support channels are community and documentation. Choose it if static typing, async access, migrations, and pooling align with a C++ application's needs and one of its three supported databases. Teams seeking a managed database service, wider dialect coverage, or vendor-provided support channels beyond community and docs should look elsewhere.
Lightweight pros and cons
- Where it wins
- Builds typed CRUD queries with joins, filtering, ordering, and pagination
- Async coroutine API offloads blocking ODBC calls to worker threads
- Includes migrations, connection pooling, and a data mapper
- Where it doesn't
- Supports only SQL Server, PostgreSQL, and SQLite
- Requires a modern C++ compiler and appropriate ODBC drivers
- Self-hosted library with community and documentation support
Lightweight fact sheet, pricing and score →
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. How we rank.
Last updated · How we research and update