awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
doctrine avatar

doctrine/dbal

0
View on GitHub↗
9,699 星标·1,375 分支·PHP·MIT·7 次浏览www.doctrine-project.org/projects/dbal.html↗

Dbal

This project is a SQL database abstraction layer that provides a consistent object-oriented interface for interacting with multiple relational database systems. It includes a driver wrapper to standardize connections and result sets, a fluent query builder for constructing portable SQL statements, and a type mapper for converting database-specific data types into native application types and vice versa.

The library enables programmatic schema management through a schema manager that can introspect database metadata, model structures as objects, and generate the SQL required to migrate between different schema versions. It also supports a middleware-based execution pipeline, allowing the interception of database operations for logging or profiling.

The system covers a broad range of database capabilities, including portable SQL generation for various dialects, transaction management with support for savepoints and isolation levels, and security primitives such as prepared statements and parameter binding to prevent SQL injection. It also provides utilities for result set normalization and CRUD operation helpers.

The project includes a command-line interface for executing raw SQL statements directly against database connections.

Features

  • Database Abstraction Layers - Provides a consistent object-oriented interface for interacting with multiple relational database systems via a unified abstraction layer.
  • Fluent Query Construction - Provides a fluent query builder for programmatically constructing portable SQL statements using method chaining.
  • Schema and Migration Tools - Analyzes differences between two schema representations and generates the SQL required to migrate between them.
  • Bidirectional Type Mappers - Includes a type mapper for converting database-specific data types into native application types and vice versa.
  • Connection Establishment - Establishes authenticated sessions with relational databases using configuration parameters or connection strings.
  • Data Type Mappings - Converts data types between a relational database and the application using built-in and user-defined mappings.
  • Database Driver Abstractions - Implements a driver wrapper that standardizes connections and result sets across various relational database vendors.
  • Database Drivers - Implements custom adapters and middleware to connect applications to proprietary or specialized relational database APIs.
  • Database Object Abstractions - Represents tables, columns, and indexes as structured objects to ensure consistent normalization and quoting.
  • Database Agnostic Generators - Provides a mechanism to generate SQL that is compatible across different database vendors and versions.
  • Schema Introspection - Retrieves detailed metadata about tables, columns, and indexes to create an in-memory representation of the schema.
  • Database Schema Managers - Programmatically inspects, models, and modifies database structures like tables and indexes using an object-oriented approach.
  • Database Transaction Management - Controls groups of database operations as single units of work with support for savepoints and isolation levels.
  • Object Oriented Querying - Offers a consistent object-oriented interface to interact with multiple relational database vendors.
  • Prepared Statements - Implements prepared statements using placeholders to ensure security against injection and enable statement reuse.
  • SQL Placeholder Bindings - Uses positional and named placeholders to separate SQL logic from input data and prevent injection attacks.
  • Relational Database Abstractions - Provides a consistent object-oriented interface to interact with multiple relational database systems regardless of vendor.
  • Programmatic Schema Forge Tools - Provides a programmatic API to execute DDL statements and control database structure without writing raw SQL.
  • SQL Dialect Adapters - Adapts queries to ensure compatibility and feature support across different relational database platforms.
  • Dialect-Specific SQL Generation - Translates abstract query requests into dialect-specific SQL strings based on the connected database version.
  • SQL Query Builders - Ships a fluent query builder for programmatically constructing portable SQL statements across different dialects.
  • Portable SQL Generation - Creates database-specific queries and schema definitions that work across different relational database engines and versions.
  • Database Wrappers - Implements a driver wrapper that standardizes connections and result sets across different relational database vendors.
  • Format Conversions - Translates application objects into the specific string formats required by the underlying database platform.
  • Type Mapping - Provides a system for translating database-specific data types into native application types and vice versa.
  • SQL Injection Prevention - Implements security primitives using prepared statements and parameter binding to prevent SQL injection attacks.
  • Database Type Converters - Translates database-specific data types into native language types to ensure consistent data handling.
  • Schema Modeling Objects - Creates an object-oriented representation of tables, sequences, and indexes to generate platform-specific SQL.
  • Common Table Expressions - Supports the creation of named temporary result sets using Common Table Expressions (CTEs) within queries.
  • Savepoints - Emulates nested transactions by managing SQL savepoints to allow partial rollbacks within a single connection.
  • Application Type Mappings - Enables implementing custom conversion logic between application objects and database values via an extensible type system.
  • Database Type Mappings - Allows overriding default vendor type mappings to control how database columns are interpreted by the application.
  • Nested Transactions - Emulates nested transactions using SQL savepoints to allow partial rollbacks within a single connection.
  • Retriable Transactions - Identifies transient failures like deadlocks to trigger automatic retry logic for transactions.
  • Autoincrement Implementations - Creates self-incrementing primary keys using identity columns to ensure consistent ID generation across platforms.
  • Indexes and Constraints - Creates and manages indexes and foreign key constraints across different database platforms.
  • In-Memory Schema Representations - Represents database structures as an object graph to calculate differences and generate migration SQL.
  • Query Expression Builders - Includes a dedicated expression builder for generating nested logic and comparison snippets for SQL filters.
  • Query Result Fetching - Allows retrieving query results as associative arrays, numeric arrays, or indexed key-value pairs.
  • Array Placeholder Expansion - Rewrites SQL queries to flatten arrays into placeholder lists for use in IN expressions.
  • Portable Snippets - Generates vendor-specific SQL snippets and function calls to ensure consistent execution across different engines.
  • SQL CRUD Operations - Provides simplified CRUD operation helpers to insert, update, or delete rows using associative arrays.
  • SQL Literal Escaping - Quotes and escapes string values to ensure they are treated as literals within database statements.
  • Transaction Demarcation & Isolation - Provides manual transaction demarcation and the ability to configure isolation levels for units of work.
  • Middleware Pipelines - Includes a middleware-based execution pipeline for intercepting database operations for logging and profiling.
  • Database Operation Interceptors - Features a middleware-based execution pipeline to intercept database operations for logging and profiling.

Star 历史

doctrine/dbal 的 Star 历史图表doctrine/dbal 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Dbal 的开源替代方案

相似的开源项目,按与 Dbal 的功能重合度排序。
  • doctrine/ormdoctrine 的头像

    doctrine/orm

    10,172在 GitHub 上查看↗

    Doctrine ORM is a PHP object-relational mapper that connects application objects to relational database tables. It uses the data mapper and identity map patterns to decouple the in-memory object model from the database schema, allowing developers to manage data persistence without writing manual SQL. The project features a dedicated object-oriented query language and programmatic builder for retrieving data based on entities rather than tables. It implements a unit-of-work system to track object changes during a request and synchronize them via atomic transactions. The capability surface inc

    PHPhacktoberfest
    在 GitHub 上查看↗10,172
  • lib/pqlib 的头像

    lib/pq

    9,903在 GitHub 上查看↗

    pq is a PostgreSQL driver for Go that implements the standard database/sql interface. It serves as a connection library and protocol implementation that translates application data types into the binary and text formats required by PostgreSQL. The project provides specialized utilities for high-performance data ingestion using bulk data loading and a dedicated bulk data importer. It also features an implementation for listening to asynchronous server notifications and provides tools for connection load balancing across multiple hosts and ports. The driver covers a broad surface of database i

    Go
    在 GitHub 上查看↗9,903
  • sqlalchemy/sqlalchemysqlalchemy 的头像

    sqlalchemy/sqlalchemy

    11,612在 GitHub 上查看↗

    SQLAlchemy is a comprehensive Python SQL toolkit and object-relational mapper that provides a full suite of tools for interacting with relational databases. It serves as a foundational layer for database connectivity, offering both a high-level object-oriented interface for data persistence and a programmatic SQL expression language for constructing complex, dialect-agnostic queries. The project distinguishes itself through its sophisticated unit of work persistence, which coordinates atomic transactions and tracks object state changes to minimize redundant database operations. It provides a

    Pythonpythonsqlsqlalchemy
    在 GitHub 上查看↗11,612
  • codeigniter4/codeigniter4codeigniter4 的头像

    codeigniter4/CodeIgniter4

    5,924在 GitHub 上查看↗

    CodeIgniter is a PHP web framework built on the Model-View-Controller pattern, designed for building full-stack web applications. It provides a lightweight toolkit with minimal configuration, organizing application logic into controllers, models, and views for clean separation of concerns. The framework includes a fluent query builder for constructing SQL statements programmatically, PSR-4 autoloading with namespace mapping, and a service-based dependency injection container for managing shared class instances. The framework distinguishes itself through its comprehensive set of built-in tools

    PHPcodeignitercodeigniter4framework-php
    在 GitHub 上查看↗5,924
查看 Dbal 的所有 30 个替代方案→

常见问题解答

doctrine/dbal 是做什么的?

This project is a SQL database abstraction layer that provides a consistent object-oriented interface for interacting with multiple relational database systems. It includes a driver wrapper to standardize connections and result sets, a fluent query builder for constructing portable SQL statements, and a type mapper for converting database-specific data types into native application types and vice versa.

doctrine/dbal 的主要功能有哪些?

doctrine/dbal 的主要功能包括:Database Abstraction Layers, Fluent Query Construction, Schema and Migration Tools, Bidirectional Type Mappers, Connection Establishment, Data Type Mappings, Database Driver Abstractions, Database Drivers。

doctrine/dbal 有哪些开源替代品?

doctrine/dbal 的开源替代品包括: doctrine/orm — Doctrine ORM is a PHP object-relational mapper that connects application objects to relational database tables. It… lib/pq — pq is a PostgreSQL driver for Go that implements the standard database/sql interface. It serves as a connection… sqlalchemy/sqlalchemy — SQLAlchemy is a comprehensive Python SQL toolkit and object-relational mapper that provides a full suite of tools for… codeigniter4/codeigniter4 — CodeIgniter is a PHP web framework built on the Model-View-Controller pattern, designed for building full-stack web… encode/databases — This project is an asyncio database abstraction layer that provides a common interface for performing non-blocking… go-pg/pg — pg is a PostgreSQL object-relational mapper (ORM) for Go that maps Go structs to database tables and provides a fluent…