Download the PHP package jacked-php/lite-connect without Composer
On this page you can find all versions of the php package jacked-php/lite-connect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jacked-php/lite-connect
More information about jacked-php/lite-connect
Files in jacked-php/lite-connect
Package lite-connect
Short Description A SQLite connection pool manager with migrations and model abstraction
License
Informations about the package lite-connect
LiteConnect
LiteConnect is a simple, lightweight SQLite package for PHP without globals. It is designed to facilitate easy and efficient SQLite database interactions. It is ideal for small to medium-sized projects that require an embedded database solution. This package provides a clean API for managing SQLite connections, running migrations, and interacting with your data models.
Features
- Connection Management: Create and manage SQLite connections.
- Migration Management: Run migrations to set up your database schema.
- Model Interaction: Perform common database operations like
create
,find
,update
,delete
,where
, andorderBy
through an intuitive API.
Installation
To install LiteConnect, you can require it via Composer:
Basic Usage
Connecting to a SQLite Database
Running Migrations
To set up your database schema, use the MigrationManager
to run migrations.
Example with a "users" table migration:
Interacting with Models
You can interact with your data using the model classes. Here is an example of a User
model:
Querying Data
You can use the where
, orderBy
, and other query methods to filter and order your data:
Using a Connection Pool
This example demonstrate how to do so with OpenSwoole - that is not a requirement for this package.
If your project is using OpenSwoole\Core
package (https://github.com/openswoole/core), here is how you accomplish it:
Testing
You can run tests by running the following after cloning the repository and installing dependencies:
Contributing
If you would like to contribute to LiteConnect, please feel free to submit pull requests or open issues on the GitHub repository.
License
LiteConnect is open-sourced software licensed under the MIT license.
All versions of lite-connect with dependencies
ext-pdo Version *
ext-sqlite3 Version *