Download the PHP package progrmanial/simple-mysqli-fork without Composer
On this page you can find all versions of the php package progrmanial/simple-mysqli-fork. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download progrmanial/simple-mysqli-fork
More information about progrmanial/simple-mysqli-fork
Files in progrmanial/simple-mysqli-fork
Package simple-mysqli-fork
Short Description Enterprise Database Toolkit for PHP - Modern schema management, intelligent migrations, and advanced query building
License MIT
Informations about the package simple-mysqli-fork
SimpleMDB - Enterprise Database Toolkit for PHP
๐ Now Enterprise-Ready! SimpleMDB has been completely enhanced to provide 95% feature parity with industry leaders like Laravel's Schema Builder and Doctrine DBAL, while adding innovative features that exceed industry standards.
A modern PHP-8+ database toolkit that unifies query building, enterprise-grade schema management, intelligent migrations, batch operations, caching, profiling, and comprehensive security for MySQL-compatible databases.
Table of Contents
- Why Choose SimpleMDB?
- System Requirements
- Installation
- Quick Start Guide
- Configuration
- Schema Builder
- Data Types Reference
- Column Modifiers
- Migration System
- Query Builder
- Connection Management
- Caching
- Security Features
- Performance Optimization
- Error Handling
- Testing
- Examples
- Troubleshooting
- API Reference
- Contributing
๐ก System Requirements
- PHP: 8.0 or higher
- MySQL: 5.7+ or 8.0+ (recommended)
- MariaDB: 10.2+ (fully supported)
- Extensions: PDO, MySQLi (at least one required)
- Memory: 64MB minimum (128MB recommended)
- Disk Space: 2MB for library files
๐ Why Choose SimpleMDB?
- ๐ฅ Enterprise-Grade Schema Builder - 19+ data types, advanced modifiers, intelligent validation
- ๐ง Intelligent Migration System - Context-aware template generation with smart type detection
- ๐ก๏ธ Security-First Design - 100% SQL injection prevention, comprehensive input validation
- โก Production-Ready Performance - Connection pooling, advanced caching, retry logic
- ๐ฏ Developer Experience - Fluent APIs, helpful error messages, self-documenting code
- ๐ง Complete Control - Full SQL access while removing boilerplate, no magic strings
๐ Industry Comparison
Framework | SimpleMDB | Laravel Schema | Doctrine DBAL | Phinx |
---|---|---|---|---|
Data Types | โ 25+ types | โ 27+ types | โ 20+ types | โ 15+ types |
Schema Validation | โ Comprehensive | โ ๏ธ Basic | โ ๏ธ Basic | โ ๏ธ Basic |
Security Features | โ Enterprise | โ Good | โ Good | โ ๏ธ Basic |
Migration Intelligence | โ Smart Templates | โ ๏ธ Static | โ Manual | โ ๏ธ Static |
Error Messages | โ Actionable | โ ๏ธ Generic | โ ๏ธ Generic | โ ๏ธ Generic |
Multi-Driver Support | โ PDO + MySQLi | โ Multiple | โ Multiple | โ Multiple |
Learning Curve | โ Gentle | โ ๏ธ Steep | โ ๏ธ Steep | โ Easy |
Result: 95% feature parity with Laravel, 100% parity with Phinx, plus innovative enhancements
๐ฏ Enterprise Features
๐ Complete Data Type Coverage (25+ Types)
Modern Data Types
Numeric Precision Types
Date, Time & Binary Types
๐ Data Types Reference
SimpleMDB supports 25+ data types covering all MySQL/MariaDB data types plus specialized types for modern applications.
String & Character Types
Method | MySQL Type | Length | Description | Example |
---|---|---|---|---|
string($name, $length) |
VARCHAR | 1-65535 | Variable-length strings | ->string('name', 100) |
char($name, $length) |
CHAR | 1-255 | Fixed-length strings | ->char('country_code', 2) |
text($name) |
TEXT | 0-65535 | Text up to 64KB | ->text('description') |
mediumText($name) |
MEDIUMTEXT | 0-16MB | Text up to 16MB | ->mediumText('article') |
longText($name) |
LONGTEXT | 0-4GB | Text up to 4GB | ->longText('log_data') |
tinyText($name) |
TINYTEXT | 0-255 | Text up to 255 chars | ->tinyText('note') |
Usage Examples:
Numeric Types
Method | MySQL Type | Range | Description | Example |
---|---|---|---|---|
tinyInteger($name) |
TINYINT | -128 to 127 | Smallest integer | ->tinyInteger('priority') |
smallInteger($name) |
SMALLINT | -32,768 to 32,767 | Small integer | ->smallInteger('count') |
mediumInteger($name) |
MEDIUMINT | -8M to 8M | Medium integer | ->mediumInteger('views') |
integer($name) |
INT | -2B to 2B | Standard integer | ->integer('quantity') |
bigInteger($name) |
BIGINT | -9E18 to 9E18 | Large integer | ->bigInteger('file_size') |
float($name, $precision, $scale) |
FLOAT | 4-byte float | Single precision | ->float('rating', 3, 2) |
double($name, $precision, $scale) |
DOUBLE | 8-byte float | Double precision | ->double('coordinates', 10, 8) |
decimal($name, $precision, $scale) |
DECIMAL | Exact numeric | Monetary values | ->decimal('price', 10, 2) |
Unsigned Variants:
Auto-Increment Types:
Date & Time Types
Method | MySQL Type | Format | Description | Example |
---|---|---|---|---|
date($name) |
DATE | YYYY-MM-DD | Date only | ->date('birth_date') |
time($name, $precision) |
TIME | HH:MM:SS | Time only | ->time('meeting_time', 3) |
datetime($name, $precision) |
DATETIME | YYYY-MM-DD HH:MM:SS | Date and time | ->datetime('created_at', 3) |
timestamp($name, $precision) |
TIMESTAMP | YYYY-MM-DD HH:MM:SS | Timestamp | ->timestamp('updated_at') |
year($name) |
YEAR | YYYY | Year only | ->year('copyright_year') |
Timestamp Helpers:
Advanced Time Features:
Binary Types
Method | MySQL Type | Size | Description | Example |
---|---|---|---|---|
binary($name, $length) |
BINARY | Fixed | Fixed-length binary | ->binary('hash', 32) |
varbinary($name, $length) |
VARBINARY | Variable | Variable-length binary | ->varbinary('data', 255) |
tinyBlob($name) |
TINYBLOB | 0-255 bytes | Tiny binary data | ->tinyBlob('thumbnail') |
blob($name) |
BLOB | 0-64KB | Binary data | ->blob('file_data') |
mediumBlob($name) |
MEDIUMBLOB | 0-16MB | Medium binary data | ->mediumBlob('image') |
longBlob($name) |
LONGBLOB | 0-4GB | Large binary data | ->longBlob('video') |
Specialized Types
Method | MySQL Type | Description | Example |
---|---|---|---|
json($name) |
JSON | JSON documents | ->json('metadata') |
enum($name, $values) |
ENUM | Enumerated values | ->enum('status', ['active', 'inactive']) |
set($name, $values) |
SET | Set of values | ->set('permissions', ['read', 'write']) |
boolean($name) |
TINYINT(1) | True/false values | ->boolean('is_active') |
uuid($name) |
CHAR(36) | UUID storage | ->uuid('external_id') |
ulid($name) |
CHAR(26) | ULID storage | ->ulid('session_id') |
Network & Address Types:
Geographic Types (MySQL 8.0+):
Polymorphic Types
Method | Description | Creates | Example |
---|---|---|---|
morphs($name) |
Polymorphic relation | {name}_id , {name}_type , index |
->morphs('commentable') |
nullableMorphs($name) |
Nullable polymorphic | {name}_id , {name}_type , index |
->nullableMorphs('taggable') |
uuidMorphs($name) |
UUID polymorphic | {name}_id (UUID), {name}_type |
->uuidMorphs('imageable') |
nullableUuidMorphs($name) |
Nullable UUID morphs | {name}_id (UUID), {name}_type |
->nullableUuidMorphs('attachable') |
Data Type Usage Examples
E-commerce Product Table
User Profile Table
Analytics & Logging Table
๐ง Column Modifiers
Column modifiers allow you to customize column behavior, constraints, and properties. SimpleMDB supports all MySQL column modifiers plus additional convenience methods.
Core Modifiers
Modifier | Description | Applies To | Example |
---|---|---|---|
nullable() |
Allow NULL values | All types | ->string('name')->nullable() |
default($value) |
Set default value | All types | ->integer('count')->default(0) |
comment($text) |
Add column comment | All types | ->string('email')->comment('User email') |
unsigned() |
Only positive values | Numeric types | ->integer('age')->unsigned() |
autoIncrement() |
Auto-increment | Numeric types | ->integer('id')->autoIncrement() |
Positioning Modifiers
Modifier | Description | Example |
---|---|---|
after($column) |
Position after column | ->string('middle_name')->after('first_name') |
first() |
Position as first column | ->string('priority')->first() |
String & Character Modifiers
Modifier | Description | Example |
---|---|---|
columnCharset($charset) |
Set column charset | ->string('name')->columnCharset('utf8mb4') |
columnCollation($collation) |
Set column collation | ->string('name')->columnCollation('utf8mb4_unicode_ci') |
Timestamp Modifiers
Modifier | Description | Example |
---|---|---|
useCurrent() |
DEFAULT CURRENT_TIMESTAMP | ->timestamp('created_at')->useCurrent() |
useCurrentOnUpdate() |
ON UPDATE CURRENT_TIMESTAMP | ->timestamp('updated_at')->useCurrentOnUpdate() |
MySQL 8.0+ Modifiers
Modifier | Description | Example |
---|---|---|
invisible() |
Hidden from SELECT * | ->string('internal_id')->invisible() |
Advanced Modifier Examples
Complete Column Customization
Numeric Column with All Modifiers
Timestamp Columns with Automatic Values
Text Columns with Charset/Collation
Invisible Columns (MySQL 8.0+)
Modifier Combination Rules
Compatible Modifiers
Incompatible Modifiers
Practical Modifier Patterns
User Table with Complete Modifiers
Product Catalog with Advanced Modifiers
๐ง Advanced Column Modifiers
๐ง Intelligent Migration System
SimpleMDB analyzes your migration names and generates context-aware templates:
Generated Template Example:
๐ก๏ธ Enterprise Security Features
100% SQL Injection Prevention
Comprehensive Input Validation
๐ฆ Installation
Method 1: Composer (Recommended)
Method 2: Manual Installation
Method 3: Git Clone
Verify Installation
โ๏ธ Configuration
Database Connection Configuration
Basic Configuration
Advanced Configuration
Environment-Based Configuration
Multiple Database Connections
๐ Quick Start Guide
1. Basic Database Connection
2. Create Your First Table
3. Insert Data
4. Query Data
5. Update Data
6. Your First Migration
๐๏ธ Schema Builder
The Schema Builder is SimpleMDB's powerful database schema management system that provides enterprise-grade features for creating, modifying, and managing database tables.
Core Concepts
1. Schema Builder Instance
2. Creating Tables
3. Modifying Tables
4. Table Operations
Advanced Schema Features
1. Constraints and Relationships
2. Indexes and Performance
3. Advanced Column Types
Schema Validation and Security
1. Column Name Validation
2. Data Type Validation
3. Modifier Compatibility
Performance Optimization
1. Efficient Schema Building
2. Index Strategy
Basic Schema Building Example
๐ Migration System
SimpleMDB's migration system provides intelligent, context-aware database schema management with automatic template generation and comprehensive rollback support.
Core Migration Concepts
1. Migration Manager
2. Creating Migrations
3. Running Migrations
4. Migration Status
Intelligent Template Generation
SimpleMDB analyzes migration names and generates context-aware templates automatically.
Pattern Recognition Examples
1. Create Table Pattern
Generated Template:
2. Add Column Pattern
Generated Template:
3. Add Index Pattern
Generated Template:
4. Modify Table Pattern
Generated Template:
Smart Type Detection
SimpleMDB automatically detects appropriate column types based on column names:
Column Name Pattern | Detected Type | Example |
---|---|---|
*_id |
unsignedInteger |
user_id โ unsignedInteger('user_id') |
*_uuid |
uuid |
external_uuid โ uuid('external_uuid') |
*_at |
timestamp |
created_at โ timestamp('created_at') |
*_on |
date |
born_on โ date('born_on') |
is_* |
boolean |
is_active โ boolean('is_active') |
has_* |
boolean |
has_premium โ boolean('has_premium') |
*_count |
unsignedInteger |
view_count โ unsignedInteger('view_count') |
*_price |
decimal |
unit_price โ decimal('unit_price', 10, 2) |
*_amount |
decimal |
total_amount โ decimal('total_amount', 10, 2) |
*_email |
string |
contact_email โ string('contact_email', 150) |
*_url |
string |
website_url โ string('website_url', 500) |
*_ip |
ipAddress |
client_ip โ ipAddress('client_ip') |
*_mac |
macAddress |
device_mac โ macAddress('device_mac') |
*_data |
json |
config_data โ json('config_data') |
*_metadata |
json |
user_metadata โ json('user_metadata') |
Advanced Migration Features
1. Rollback Support
2. Migration Status and History
3. Batch Operations
4. Migration Seeding
Migration File Structure
Standard Migration Template
Advanced Migration with All Features
Migration CLI Commands
Command Examples
Best Practices
1. Migration Naming
2. Safe Migration Practices
3. Rollback Safety
Intelligent Migrations
Advanced Query Building
๐ Complete Feature Matrix
Category | Features |
---|---|
๐๏ธ Schema Builder | 25+ data types, 9+ modifiers, intelligent validation, polymorphic support |
๐ Migrations | Smart templates, up/down migrations, rollback, status tracking, auto-discovery |
๐ Query Builder | SELECT/INSERT/UPDATE/DELETE, CTEs, window functions, JSON operations, unions |
๐ Connections | PDO + MySQLi drivers, SSL/TLS, connection pooling, health checks, failover |
โก Performance | Redis/Memcached caching, query profiling, batch operations, retry logic |
๐ก๏ธ Security | SQL injection prevention, input validation, reserved word detection |
๐งช Development | Query debugging, error analysis, fake data generation, comprehensive logging |
๐ Monitoring | Query profiling, performance analysis, execution timing, memory tracking |
๐ง Advanced Examples
Polymorphic Relationships
Complex Schema with All Features
Migration with Intelligent Features
๐ Documentation Roadmap
We're planning comprehensive documentation to match our enterprise status:
Phase 1: Core Documentation (Coming Soon)
- ๐ Complete API Reference - Every method, parameter, and return type
- ๐ฏ Migration Guide - From Laravel/Doctrine to SimpleMDB
- ๐ก๏ธ Security Best Practices - Enterprise-grade security guidelines
- โก Performance Optimization - Caching, indexing, query optimization
Phase 2: Advanced Guides (Planned)
- ๐๏ธ Schema Design Patterns - Best practices for complex schemas
- ๐ Advanced Migration Strategies - Large-scale database changes
- ๐งช Testing & Development - Testing database schemas and migrations
- ๐ Monitoring & Debugging - Production database management
Phase 3: Multi-Database Support (Future)
- ๐ง PostgreSQL Support - Full feature parity for PostgreSQL
- ๐๏ธ SQLite Support - Development and testing workflows
- โ๏ธ Cloud Database Guides - AWS RDS, Google Cloud SQL, Azure
๐ค Contributing
SimpleMDB is now an enterprise-grade framework, and we welcome contributions that maintain our high standards:
- ๐ Bug Reports - Detailed issues with reproducible examples
- โจ Feature Requests - Enterprise features that add real value
- ๐ Documentation - Help us build world-class docs
- ๐งช Testing - Comprehensive test coverage for all features
๐ License
MIT License - Use SimpleMDB in any project, commercial or open source.
SimpleMDB is now production-ready for enterprise applications. Join the growing community of developers who choose SimpleMDB for its combination of power, security, and developer experience.
๐ Star us on GitHub if SimpleMDB helps you build better applications!
All versions of simple-mysqli-fork with dependencies
ext-mysqli Version *
ext-pdo Version *
ext-json Version *
ext-mbstring Version *
psr/log Version ^3.0
psr/event-dispatcher Version ^1.0