Download the PHP package concept-labs/dbal without Composer
On this page you can find all versions of the php package concept-labs/dbal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download concept-labs/dbal
More information about concept-labs/dbal
Files in concept-labs/dbal
Informations about the package dbal
Concept DBAL
A low-level, foundational tool for building database abstractions in PHP 8.2+. Part of the Concept Ecosystem, designed specifically for Dependency Injection using Singularity Container.
⚠️ Important: DBAL is NOT an ORM or ActiveRecord - it's a low-level query builder that you use to BUILD ORMs, ActiveRecord, Repositories, Collections, and other data patterns. Think of it as LEGO blocks for your data layer.
What DBAL Is
- ✅ Low-level query builder - Programmatic SQL construction
- ✅ Foundation for abstractions - Build ORMs, ActiveRecord, Repositories on top
- ✅ Type-safe primitives - Building blocks for your data layer
- ✅ Expression-based - Built on concept-labs/expression
What DBAL Is Not
- ❌ Not an ORM - Doesn't map tables to objects (build your own!)
- ❌ Not ActiveRecord - No model classes (implement your own!)
- ❌ Not a complete solution - Provides primitives, not patterns (you choose the patterns!)
See Building on DBAL for examples of building ActiveRecord, ORMs, Repositories, Collections, and more.
Features
- 🎯 Fluent Query Builder - Intuitive, chainable API built on concept-labs/expression
- 🔧 Type-Safe - Leverages PHP 8.2+ features for better type safety
- 🏗️ Clean Architecture - Interface-driven design with clear separation of concerns
- 💉 DI-First - Designed for dependency injection with Singularity container
- 🚀 Performance - Efficient query building with prototype pattern
- 🔌 Extensible - Easy to extend with custom builders and expressions
- 🌐 Framework Agnostic - Works standalone or integrates with modern frameworks
- 📦 Ecosystem Integration - Part of Concept-Labs packages working seamlessly together
Quick Start
Installation
With Dependency Injection (Recommended)
DBAL is designed from the ground up for dependency injection with Singularity Container, leveraging the powerful concept-labs/expression system for building complex SQL expressions.
Basic DI Usage
Advanced Expression Building
Build complex conditions with the expression system:
Expression Composition & Reusability
Create reusable expression components for consistent logic:
Aggregate Functions & Analytics
Leverage SQL aggregate functions through expressions:
Dynamic Filter Builder Pattern
Build filters dynamically based on user input:
See Examples for more real-world patterns.
Standalone Usage
Query Examples
Documentation
📚 Documentation Index
Getting Started:
- Introduction - Package overview, Concept Ecosystem, what DBAL is/isn't
- Building on DBAL - Build ORMs, ActiveRecord, Repositories, Collections
- Installation - Installation with DI and standalone setup
- Quick Start - Get started with query building
- Standalone Usage - Using DBAL without a framework
- Framework Integration - Laravel, Symfony, Slim, and more
Technical Guides:
- Architecture - Design patterns and Expression package integration
- Query Builders - Complete guide to query builders
- SQL Expressions - Expression system from concept-labs/expression
- Dependency Injection - Integration with Singularity
- Concept Ecosystem - Integration with other Concept packages
Reference & Examples:
- API Reference - Complete API documentation
- Best Practices - Recommended patterns and practices
- Examples - Real-world usage examples
- Comparison - How we compare to other solutions
Why Concept DBAL?
This package is specifically designed as part of the Concept Ecosystem with these principles:
- DI-First Architecture - Built for dependency injection with Singularity container
- Clean Code - Interface-driven design promotes testability and maintainability
- Type Safety - Full use of PHP 8.2+ type system reduces runtime errors
- Expression-Based - Built on concept-labs/expression for powerful query building
- Ecosystem Integration - Seamlessly works with other Concept-Labs packages
- Framework Agnostic - Use standalone or integrate with any modern PHP framework
Part of Concept Ecosystem
Concept DBAL is a core component of the Concept Ecosystem and depends on:
Core Dependencies
-
concept-labs/expression - Base expression language system
- DBAL extends Expression to build SQL-specific expressions
- Provides fluent, chainable expression building
- Type-safe query component construction
-
concept-labs/dbc-pdo - PDO Database Connection wrapper
- Connection management and query execution
- Transaction support
- Prepared statement handling
-
concept-labs/config - Configuration management
- Database connection configuration
- Environment-specific settings
- concept-labs/exception - Exception handling
- Structured error handling
- Database-specific exceptions
DI Container
- Singularity - Dependency Injection Container
- Auto-wiring of all DBAL components
- Service lifecycle management
concept.jsonconfiguration support
Requirements
- PHP 8.2 or higher
- Composer for dependency management
License
Apache License 2.0. See LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For issues, questions, or contributions, please visit our GitHub repository.
All versions of dbal with dependencies
concept-labs/exception Version ^1
concept-labs/config Version ^2
concept-labs/expression Version ^1
concept-labs/dbc-pdo Version ^1