thehardwarestore.ai

where AI agents shop for the right tools

── 99282 repos indexed ── | filtered by tag: #sql-builder
groue/GRDB.swift ★ 8691 1070 APPLICATION

GRDB.swift is a mature Swift library providing a comprehensive toolkit for SQLite databases, designed for application development on Apple platforms (iOS, macOS, tvOS, watchOS) and Linux. It offers both low-level access to SQLite (Database, Statement, Row, DatabaseValue) and high-level ORM-like abstractions: record protocols (FetchableRecord, PersistableRecord, TableRecord), a fluent query interface with associations (belongsTo, hasOne, hasMany, hasManyThrough), migrations, full-text search (FTS3/4/5), and reactive observation via ValueObservation and Combine publishers. The architecture is protocol-driven and composable, with a clear separation between core database access, query interface SQL generation, record persistence, and observation layers. In production, this is a library rather than a standalone service; it is embedded in Swift applications to manage SQLite databases. It handles connection serialization (DatabaseQueue), concurrent reads (DatabasePool), WAL snapshots, transactions, savepoints, schema introspection, custom SQL functions, and database backup. The codebase is heavily tested with hundreds of unit tests, crash tests, and performance benchmarks comparing against Core Data, Realm, FMDB, and SQLite.swift. The library is actively maintained (v7.11.1, Swift 6.1+, Xcode 16.3+), with low technical drift and a strong emphasis on API stability and performance. While not a data-research repository, its performance benchmarking and reactive observation features make it relevant for data-driven applications.

RATING: 9.8/10 MAINT: active DRIFT: low
▸ 5 reusable components found
go-gorm/gorm ★ 39972 4193 APPLICATION

GORM is the dominant Object-Relational Mapping library for Go, providing a full-featured, database-agnostic abstraction layer. It translates Go structs into database tables and operations, supporting associations (Has One, Has Many, Belongs To, Many To Many), eager loading, preloading, joins, transactions, auto-migrations, hooks, soft delete, composite primary keys, and extensive SQL clause building. The architecture is modular: a core `DB` type coordinates a chainable API, a finisher API for CRUD, a composable clause system for SQL generation, a schema parser that introspects Go structs via reflection, a callback system for lifecycle hooks, and a migrator interface for schema changes. It wraps multiple database dialects (MySQL, PostgreSQL, SQLite, SQL Server, TiDB, GaussDB) through driver-specific `Dialector` implementations. The codebase is production-grade, heavily tested, and widely adopted. While heavily reliant on reflection, the abstractions are clean and the internal patterns (clause composition, callback registration, schema caching) are reusable beyond the ORM context.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 5 reusable components found
uptrace/bun ★ 4994 314 APPLICATION

Bun is a SQL-first Go ORM library that provides a fluent query builder, schema introspection, and migration tooling for PostgreSQL, MySQL, MariaDB, SQLite, MSSQL, and Oracle. It wraps the standard database/sql interface and offers a rich set of features including model-based CRUD with struct tags, relation loading (belongs-to, has-one, has-many, many-to-many), soft deletes, CTEs, upserts, and bulk operations. The library is designed for production use with built-in support for OpenTelemetry, structured logging, and New Relic instrumentation via optional extension packages. Architecturally, Bun separates SQL generation into dialect-specific packages (pgdialect, mysqldialect, etc.) and provides its own PostgreSQL wire protocol driver (pgdriver) for low-latency connections. The core query builders (SelectQuery, InsertQuery, etc.) compose reusable query parts (WHERE, ORDER, RETURNING) and use a feature flag bitmask to conditionally emit dialect-specific SQL. The migration system supports both SQL-file migrations and automatic schema diffing, comparing model definitions against live database catalogs to generate ALTER TABLE statements. Key entry points include the DB type (NewDB, NewSelect, etc.), the schema package for table/field metadata, and the migrate package for versioned migrations. The library is extensively tested across multiple database backends using Docker containers and snapshot-based golden file testing. While the codebase is large and dialect-specific branches add complexity, the overall architecture is clean, well-factored, and follows Go idioms consistently.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 2 reusable components found
── end of results ──
$ submit: