Download the PHP package pardnchiu/mysql-cli without Composer
On this page you can find all versions of the php package pardnchiu/mysql-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pardnchiu/mysql-cli
More information about pardnchiu/mysql-cli
Files in pardnchiu/mysql-cli
Package mysql-cli
Short Description A lightweight MySQL client for PHP featuring intuitive chaining syntax with query builder capabilities and read-write separation.
License MIT
Homepage https://pardn.io
Informations about the package mysql-cli
MySQL CLI
Lightweight PHP MySQL client with chainable syntax, query builder and read-write separation.
Following stateless architecture principles, providing stable and reliable database operation experience.
- Three Core Features
- Chainable Syntax
- Read-Write Separation
- Stable Connection
- Features
- Usage
- Installation
- Environment Variables Setup
- Basic Usage
- API Reference
- Query Builder
- JOIN Operations
- Data Operations
- Error Handling
- License
- Author
Three Core Features
Chainable Syntax
Intuitive query builder syntax that makes complex SQL queries simple and readable with low learning curve
Read-Write Separation
Automatically identifies query types and routes to corresponding database connections, supports read-write separation architecture, effectively distributes database load and improves overall system performance
Stable Connection
Retry mechanism automatically handles network jitter and temporary connection failures, ensuring reliability in unstable network environments
Features
- Environment Variable Configuration: Flexible environment variable settings, supports multi-environment deployment
- Slow Query Monitoring: Automatically logs queries over 20ms, assists with performance optimization
- Secure Parameter Binding: Prepared statements prevent SQL injection attacks
- Complete CRUD: Supports full database operations for create, read, update, delete
- SQL Function Support: Built-in common MySQL function recognition and processing
- Stateless Design: Independent cleanup for each request
Usage
Installation
Environment Variables Setup
Read Database (Optional)
Write Database (Required for write operations)
Basic Usage
API Reference
Query Builder
-
table($table, $target = "READ")
- Set target table and connection type -
select($fields)
- Specify query fields -
where($column, $operator, $value)
- Add conditions -
orderBy($column, $direction)
- Sorting limit($count)
/offset($count)
- Pagination
JOIN Operations
Data Operations
Error Handling
Performance Monitoring
License
This project is licensed under MIT.
Author
邱敬幃 Pardn Chiu
©️ 2024 邱敬幃 Pardn Chiu