38 个仓库
Libraries that provide compile-time validation for database queries based on schema definitions.
Distinguishing note: Focuses on the type-safety of the query interface, distinct from general ORM functionality.
Explore 38 awesome GitHub repositories matching data & databases · Type-Safe Query Builders. Refine with filters or upvote what's useful.
Prisma is a database toolkit that provides a unified access layer for interacting with relational and document databases. It centers on a declarative schema modeling approach, where developers define their data structures in a human-readable language. This schema serves as the single source of truth, from which the toolkit automatically generates type-safe database clients that provide compile-time validation and editor autocomplete for all data operations. The project distinguishes itself through a high-performance, Rust-based query engine that handles query planning and connection pooling o
Writes database queries that are automatically validated against the schema to prevent runtime errors.
Drizzle ORM is a TypeScript-native database toolkit providing type-safe SQL query building, schema management, and automated migrations across PostgreSQL, MySQL, SQLite, and SingleStore.
Provides full TypeScript autocompletion and compile-time validation for database queries.
SQLModel is a type-safe object-relational mapping library for Python that integrates database schema definitions with data validation logic. By combining these two roles into a single class, it allows developers to manage relational data structures and enforce data integrity for web APIs simultaneously. The framework is built to support asynchronous database operations, enabling high-performance applications to execute queries and transactions without blocking the main execution thread. The library distinguishes itself by leveraging Python type hints to provide IDE autocompletion and compile-
Uses static type analysis and class attributes to build database queries that provide IDE autocompletion and compile-time safety.
Ent is a statically typed entity framework for Go that models database structures as a graph of nodes and edges. It functions as a code generation engine that transforms schema definitions into type-safe database clients, query builders, and migration scripts. By representing data as interconnected entities, the framework enables intuitive traversal of complex relationships and ensures that database interactions remain consistent with the application model at compile time. The framework distinguishes itself through its graph-based approach to data modeling and its reliance on compile-time cod
Enforces compile-time type safety for database queries based on defined entity schemas.
Prisma1 is a TypeScript object-relational mapper and type-safe database client designed for interacting with relational databases. It functions as a system for declarative schema modeling, where database structures are defined in a single schema file that automatically synchronizes with the underlying database. The project provides a type-safe query builder that generates a custom client to ensure database queries match defined schema types at compile time. It also includes a database GUI administrator, providing a visual web interface for browsing, editing, and managing relational database r
Provides a query builder with compile-time validation based on the defined schema.
Prisma is a type-safe database object-relational mapper that uses a declarative schema to map data models to relational and document databases. It provides a unified toolkit for data access, combining a database driver with tools for schema management and record manipulation. The project features a multi-database driver that standardizes interactions across PostgreSQL, MySQL, and MongoDB. It includes a system for tracking and applying structural schema migrations across different environments and a graphical user interface for browsing and editing database records. The system ensures data in
Provides a programmatic interface for retrieving and manipulating records with automatic type checking and compile-time validation.
Pglite is a client-side relational database engine that runs a full-featured PostgreSQL instance directly within browser and Node.js environments. By leveraging WebAssembly, it provides a persistent SQL storage solution that enables complex data management and querying without requiring an external database server. The project distinguishes itself through a reactive SQL data layer that automatically synchronizes user interface components with live query results. It manages database operations using worker threads to prevent main-thread blocking and coordinates access across multiple browser t
Offers type-safe query builders that translate application logic into SQL, ensuring compile-time validation.
Gel is an object-relational database system that models data as a graph of interconnected objects. By utilizing a strongly typed schema, it enables complex relational queries and polymorphic data structures without the need for traditional join tables. The system integrates native vector storage and similarity search operators, allowing it to function as both a relational and a vector database for semantic data retrieval. The platform distinguishes itself through a comprehensive suite of developer-centric automation tools. It features a declarative migration system that tracks and versions sc
Generates language-specific code and query interfaces from database schemas to ensure type safety during application development.
Kysely is a TypeScript SQL query builder that provides a type-safe interface for constructing and executing database queries. It functions as a database layer that ensures schema compliance and prevents runtime errors by using a fluent interface and a programmable way to build complex SQL statements. The project features a type-safe database layer capable of inferring return types and aliases from SQL selections and joins. It also includes a SQL migration manager to track and apply schema changes across different environments to keep database versions synchronized. The toolkit covers relatio
Provides a type-safe query builder that ensures database schema compliance at compile time.
This project is a type-safe database toolkit and object-relational mapper designed to enforce structural consistency between database schemas and application code. By leveraging compile-time validation, it ensures that SQL queries and data structures remain synchronized, preventing common errors before the application executes. It provides a comprehensive framework for relational data modeling, allowing developers to define table associations and map database results directly into strongly-typed language objects. The library distinguishes itself through its focus on compile-time safety and au
Provides a type-safe database interaction layer that validates queries at compile time.
f8app is a cross-platform mobile reference application implementation that serves as a technical architecture guide for building complex features in a production environment. It is built as a React Native mobile application using a component-based architecture to manage the user interface and application state. The project implements a dockerized backend environment, running a database, server, and dashboard as a group of coordinated containers to ensure consistent development environments. It further integrates a GraphQL data fetching system that uses a structured schema and compiler to ensu
Provides compile-time validation for remote data queries based on a structured schema.
This project is a database driver and interface for the Go programming language, specifically designed for PostgreSQL. It provides a low-level library for executing SQL queries, managing transactions, and handling data persistence within Go applications. The driver distinguishes itself by implementing the native PostgreSQL binary wire protocol, which minimizes communication overhead and maximizes data transfer efficiency. It includes advanced connection pooling to maintain persistent database sessions and supports prepared statement caching to accelerate the execution of frequently repeated o
Provides a toolkit for constructing complex SQL statements and mapping database rows to strongly typed Go structures.
greenDAO is an object-relational mapping library for Android that maps Java objects to SQLite databases. It provides infrastructure for high-performance data persistence by translating data objects into database records and vice versa. The library implements a type-safe query builder for retrieving records across multiple entities using joins and relationship chaining. It also includes a security layer that provides full-disk encryption for the SQLite database to prevent unauthorized access to stored information. The system utilizes compile-time code generation to create mapping classes, avo
Provides a type-safe query builder for retrieving records across multiple entities using joins.
WCDB is a cross-platform storage layer and embedded database engine that serves as a framework for SQLite. It functions as an object relational mapper, linking application classes to database tables to enable data operations via objects rather than raw queries. The project is distinguished by an integrated encryption layer for securing data at rest and a full-text search engine that uses language-specific tokenizers for text lookups. It also features transparent field compression to reduce storage footprints and a connection-pooling model to coordinate simultaneous read and write operations a
Translates native language expressions into SQL queries to ensure type safety and prevent injection attacks.
OpenCode is a terminal-based development agent that automates software engineering tasks by integrating artificial intelligence directly into the command-line environment. It functions as an autonomous workflow orchestrator, capable of executing file operations, running shell commands, and applying code patches to complete complex development tasks without manual intervention. The tool distinguishes itself through its ability to index local codebases into vector embeddings, enabling semantic search and natural language queries across project files. It maintains session context through a local
Provides compile-time validation for database queries based on schema definitions.
EmDash is an open-source content management system built on Astro that combines a visual admin panel with a plugin-driven architecture and server-side rendering. It provides a complete content management system with structured content modeling, a rich text editor using Portable Text format, and a TypeScript API for type-safe content queries. The system supports authentication through passkeys, OAuth 2.1, and external providers, with role-based access control and fine-grained permission scopes. What distinguishes EmDash is its plugin development framework, which supports both native plugins ru
Generates TypeScript types from the content model for autocomplete and compile-time validation.
SQLite.swift is a type-safe Swift wrapper and object-relational mapping layer that provides a bridge for interacting with SQLite databases. It functions as a database driver that allows for embedded database management and local data persistence within Swift applications. The project distinguishes itself through a type-safe expression builder that verifies SQL statement syntax and intent at compile time. It includes specialized support for high-performance text matching via full-text search integration and provides mechanisms for securing sensitive data through database encryption. The libra
Provides a type-safe expression builder that verifies SQL statement syntax and intent at compile time.
Mikro-ORM is a TypeScript-based object-relational mapping system that provides a unified persistence layer for Node.js applications. It translates TypeScript entities into relational or document-based database schemas, supporting a variety of engines including PostgreSQL, MySQL, MariaDB, MS SQL Server, SQLite, and MongoDB. The project implements the data mapper pattern to decouple in-memory domain models from the database persistence layer. It utilizes a unit of work pattern to track entity changes in memory and commit them in a single coordinated database transaction. The library covers com
Offers a type-safe query builder with compile-time validation, relational population, and sorting.
pysheeet 是一个技术参考库,提供了一系列精选的代码片段和实现模式,用于高级 Python 开发、系统集成和高性能计算。它充当实现底层网络编程、原生 C 扩展以及异步和并发编程的综合指南。 该项目为大语言模型的开发和部署提供了专门的框架,包括用于分布式 GPU 推理和高性能服务的工具。它还包括用于高性能计算集群编排的详细模式,涵盖 GPU 资源分配和多节点工作负载管理。 该库涵盖了广泛的功能,包括安全网络通信和加密、对象关系映射和数据库管理,以及复杂数据结构和算法的实现。它还提供用于内存管理、通过外部函数接口(FFI)进行原生互操作以及系统级 OS 集成的实用程序。
Implements SQL table aliasing to enable self-joins and row comparisons within a single query.
GRDB.swift is a comprehensive SQLite toolkit and object-relational mapper for Swift. It provides a database wrapper that handles local data persistence, connection management, and encrypted file storage for Apple platforms. The library features a dedicated observation framework that tracks database changes to automatically synchronize the application state and user interface in real time. It distinguishes itself with a type-safe query builder and a protocol-based mapping system that converts database rows into structured Swift objects. The toolkit covers a broad range of administrative and o
Provides a type-safe query builder to construct SQL statements using structured Swift expressions.