Download the PHP package shredio/rapid-database-operations without Composer
On this page you can find all versions of the php package shredio/rapid-database-operations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package rapid-database-operations
Rapid Database Operations
A PHP library for high-performance database operations with Doctrine ORM support.
Installation
Requirements
- PHP 8.3 or higher
- Doctrine ORM 3.0+ (optional, for Doctrine integration)
- Doctrine DBAL 4.0+ (optional, for Doctrine integration)
Features
- High-performance database operations - Optimized bulk insert and update operations
- Doctrine ORM integration - Seamless integration with Doctrine entities
- Multiple database platforms - Support for MySQL and SQLite
- Type-safe operations - Generic templates for type safety
- Symfony Bundle - Easy integration with Symfony applications
- Flexible escaping - Customizable value escaping strategies
Basic Usage
Using RapidOperationFactory
The RapidOperationFactory is the main entry point for creating database operations:
Insert Operations
Update Operations
Direct Usage (Alternative)
You can also create operations directly:
Operation Types
createInsert(string $entity)
Creates a basic insert operation that will fail if duplicate keys are encountered.
createUniqueInsert(string $entity)
Creates an insert operation that silently ignores duplicate records using INSERT ... ON DUPLICATE KEY ... DO NOTHING.
createUpsert(string $entity, array $fieldsToUpdate = [])
Creates an upsert operation that inserts new records or updates existing ones on conflict. You can specify which fields to update, or leave empty to update all fields.
createUpdate(string $entity, array $conditions)
Creates a standard update operation using direct UPDATE statements. Best for smaller datasets.
createBigUpdate(string $entity, array $conditions)
Creates an optimized update operation that uses temporary tables for better performance with large datasets.
Symfony Integration
The library includes a Symfony bundle for easy integration: