14 个仓库
Automatically transforms database result sets into strongly-typed language objects by matching columns to fields.
Distinct from Struct Hydrators: Distinct from Struct Hydrators: focuses on the specific mapping of database rows to structs rather than general hash-to-struct hydration.
Explore 14 awesome GitHub repositories matching data & databases · Row-to-Struct Mappers. Refine with filters or upvote what's useful.
sqlx is a set of extensions for the Go database/sql package that reduces boilerplate code by automating the mapping of database query results directly into structs and slices. It provides a wrapper around standard database types to eliminate manual row scanning and repetitive error handling. The project distinguishes itself through named parameter binding and query placeholder rebinding, which translate generic markers into driver-specific symbols. It also enables dynamic SQL execution by allowing the application to read and execute SQL statements directly from the filesystem. The library co
Uses Go reflection to automatically match database column names to struct fields via custom tags or naming conventions.
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
Automatically maps database result rows to strongly-typed application objects.
This project is a GraphQL implementation for Go, providing a complete suite for building GraphQL servers. It includes a schema engine for defining types, a query parser to convert strings into abstract syntax trees, and an execution engine that resolves fields against a defined schema to return structured data. The library distinguishes itself through reflection-based type mapping, allowing object definitions and arguments to be derived directly from native Go structs. It also supports the execution of real-time data streaming via GraphQL subscriptions and provides an extensible execution pip
Derives GraphQL argument definitions directly from native Go struct properties to simplify input handling.
This project is an educational blog and learning resource dedicated to the Rust programming language. It provides a collection of curated guides, technical articles, and structured learning paths designed to teach language fundamentals, concurrency, and systems programming. The repository distinguishes itself by offering practical implementation tutorials for complex systems. This includes detailed guides on compiler development—specifically translating source code into targets such as ARM64, x86_64, LLVM IR, and WebAssembly—as well as networking examples for building multithreaded chat serve
Demonstrates transforming database query results into strongly-typed language structures using derive macros.
mapstructure is a reflection-based library for the bidirectional encoding and decoding of generic map data into native typed Go structures. It functions as a tool for transforming loosely typed map values into specific structs and encoding those structs back into maps. The library utilizes Go reflection to map generic data keys to struct fields during runtime. It supports the transformation of untyped data from dynamic sources or configuration files into type-safe native structures. The mapping process includes recursive traversal of nested maps and slices, as well as the use of struct tags
Directly populates the memory addresses of target structures from generic maps using Go reflection.
CXX is a code generator that produces a safe, zero-overhead FFI bridge between Rust and C++. It lets functions and data types from either language be used directly in the other, with static type safety enforced at compile time and no copying, serialization, or runtime checks across the boundary. The bridge supports the full range of cross-language interactions: Rust can call C++ functions and use C++ types, and C++ can call Rust functions and use Rust types. Standard library types like strings, vectors, and smart pointers are mapped automatically between the two languages, while opaque types
Declares struct fields visible to both languages from a single source of truth, eliminating manual synchronization.
Ecto is an Elixir database toolkit that maps database rows to Elixir structs and validates data changes through changesets before persistence. It provides a language-integrated query syntax for composing database queries, building them incrementally and securely with compile-time expansion into safe SQL. The toolkit connects to multiple database backends including PostgreSQL, MySQL, MSSQL, SQLite3, ClickHouse, and ETS through a pluggable adapter interface. It supports eager and lazy preloading of associated records to eliminate N+1 query problems, and can store nested data structures as embed
Maps Elixir structs to database tables using declarative field definitions with type casting.
c3c is the compiler for the C3 programming language, transforming source code into executable binaries, static libraries, or dynamic libraries using an LLVM backend. It implements a system based on result-based error handling, scoped memory pooling, and a semantic macro system. The compiler provides first-class support for hardware-backed SIMD vectors that map directly to processor instructions and enables runtime polymorphism through interface-based dynamic dispatch. The project covers a broad set of low-level capabilities, including manual and pooled memory management, inline assembly inte
Employs the splat operator to provide default values to struct initializers.
Anchor is a framework for building, testing, and deploying Solana smart contracts. It provides a Rust domain-specific language (DSL) that uses macro‑based instruction dispatch and derive‑macro account validation to automate ownership checks, discriminator enforcement, and serialization before instruction execution. The framework also includes a CLI toolchain for scaffolding, compiling, and managing contracts across workspaces, a test harness that simulates program execution with account manipulation and compute unit benchmarking, and an IDL generator that emits a standardized JSON interface fr
Reads instruction arguments from within Solana account structs by listing them in handler order.
Bun 是一个 Go 语言的类型安全对象关系映射器(ORM),优先考虑 SQL 优先的查询构建和结果映射。它作为一个可编程 SQL 查询构建器、数据库连接管理器以及将数据库表映射到 Go 结构体的工具。 该项目通过多方言 SQL 支持系统脱颖而出,允许单个代码库通过一致的接口与不同的数据库引擎交互。它包括一个用于查询拦截、分布式跟踪和日志记录的内置数据库可观测性工具,以及一个用于版本化结构变更的模式迁移工具。 该库涵盖了广泛的数据操作,包括批量处理、Upsert、软删除以及多态关联等关系数据的管理。它提供使用公用表表达式(CTE)和窗口函数进行高级 SQL 分析的功能,以及原子事务管理和连接池。 模式管理通过用于应用版本化迁移脚本的命令行界面支持。
Automatically transforms database result sets into strongly-typed Go structures by matching columns to fields.
Prost 是一个 Rust 语言的 Protocol Buffers 实现,作为二进制序列化框架和代码生成器使用。它将模式定义转换为符合 Rust 习惯的结构体(structs)和枚举(enums),并提供将结构化数据编码和解码为 Protocol Buffers 二进制格式所需的逻辑。 该项目的特色在于其 no-std 实现,使其能够在缺乏标准库的嵌入式或内核环境中运行。它还通过发出文件描述符集(file descriptor sets)充当模式内省器,从而支持在运行时对原始模式定义进行程序化分析。 该库涵盖了广泛的功能,包括用于接口建模的服务 trait 生成、对已知类型的支持,以及用于映射手动类型定义的程序宏注解。它还提供了依赖管理和模糊测试工具,以确保序列化的稳定性。
Translates Protocol Buffer schema files into idiomatic Rust structs and enums for type safety.
Apollo Kotlin is a strongly-typed GraphQL client and code generation library designed for Kotlin and JVM applications. It functions as a comprehensive development tool that transforms GraphQL schema definitions and query documents into type-safe models during the build process, ensuring that data access errors are identified at compile time rather than at runtime. The project distinguishes itself through its multiplatform runtime abstraction, which allows developers to share data fetching and caching logic across Android, iOS, and desktop environments. It provides a normalized local caching s
Translates query arguments into URL parameters or request bodies for various HTTP methods to ensure data reaches the correct backend destination.
Gorp is a lightweight object-relational mapper for Go that binds structs to relational database tables. It functions as a relational data mapper and SQL dialect abstraction layer, automating the translation between application data and relational rows. The project provides a translation layer that generates vendor-specific SQL for PostgreSQL, MySQL, SQLite, Oracle, and SQL Server. It distinguishes itself by implementing optimistic locking via version columns to prevent concurrent update conflicts and providing a database schema generator to create tables and indexes from object definitions.
Automatically transforms database result sets into hierarchical Go objects by supporting nested structs.
Drift is a type-safe SQL persistence library and relational mapper that provides a structured way to map database tables to classes and execute SQL queries with build-time validation. It functions as a type-safe query builder and a wrapper for SQLite and PostgreSQL, eliminating manual result set parsing by binding query outputs to native objects. The project distinguishes itself through a build-time code generation system that produces type-safe APIs and validates raw SQL statements against database versions before execution. It features reactive query streaming, which transforms SQL queries
Automatically transforms database result sets into strongly-typed language objects by matching columns to generated classes.