Download the PHP package tourze/doctrine-direct-insert-bundle without Composer
On this page you can find all versions of the php package tourze/doctrine-direct-insert-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tourze/doctrine-direct-insert-bundle
More information about tourze/doctrine-direct-insert-bundle
Files in tourze/doctrine-direct-insert-bundle
Package doctrine-direct-insert-bundle
Short Description Symfony Bundle for direct database insertion of objects
License MIT
Informations about the package doctrine-direct-insert-bundle
Doctrine Direct Insert Bundle
中文
A Symfony bundle that provides direct database insertion capabilities for Doctrine entities without using the ORM's persist/flush mechanism.
This bundle is designed for high-performance scenarios where you need to insert data directly into the database.
Features
- Direct database insertion without ORM overhead
- Support for auto-generated and preset IDs
- Dedicated database connection support
- Compatible with various data types (string, text, integer, float, boolean, nullable fields)
- Automatic SQL generation based on entity metadata
Installation
Configuration
Add the bundle to your config/bundles.php:
Quick Start
Basic Usage
With Preset ID
Entity Example
Advanced Usage
Dedicated Connection
This bundle supports dedicated database connections using the @WithDedicatedConnection attribute. The service uses a dedicated connection channel called direct_insert for improved performance and isolation.
Data Type Support
The bundle supports all standard Doctrine data types:
- String and Text types
- Integer and Float types
- Boolean types
- Nullable fields
- Auto-generated IDs
- Preset IDs
Performance Benefits
- No ORM Overhead: Bypasses Doctrine's Unit of Work for faster insertions
- Dedicated Connection: Uses a separate database connection to avoid conflicts
- Direct SQL: Generates optimized INSERT statements directly
- Batch Operations: Suitable for high-volume data insertion scenarios
Requirements
- PHP 8.1+
- Symfony 6.4+
- Doctrine ORM 3.0+
- Doctrine DBAL 4.0+
Dependencies
This bundle depends on:
tourze/doctrine-entity-checker-bundle- For SQL formatting utilities
License
This bundle is licensed under the MIT License. See the LICENSE file for details.
All versions of doctrine-direct-insert-bundle with dependencies
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^3.0
doctrine/persistence Version ^4.1
symfony/config Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/framework-bundle Version ^7.3
symfony/http-kernel Version ^7.3
symfony/property-access Version ^7.3
symfony/yaml Version ^7.3
tourze/bundle-dependency Version 1.*
tourze/doctrine-entity-checker-bundle Version 1.0.*
tourze/symfony-dependency-service-loader Version 1.*