phpolar/sqlite-storage 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

phpolar/sqlite-storage

最新稳定版本:1.1.2

Composer 安装命令:

composer require phpolar/sqlite-storage

包简介

Adds support for storing data in SQLite databases.

README 文档

README

Adds support for SQLite3 storage in your application.

PHPolar logo

Coverage Status Badge Latest Stable Version Total Downloads License PHP Version Require Weekly Check

Website

Quick start

# create an example application

composer require phpolar/sqlite-storage

Objectives

  1. Keep project small. See thresholds
  2. Automatically load and persist data

Note For more details see the acceptance tests results

Example 1

$sqliteStorage = new SqliteStorage(
    connection: $connection,
    tableName: "table_name",
    typeClassName: Person::class,
);

$sqliteStorage->save($item1->id, $item);
$sqliteStorage->replace($updatedItem->id, $updatedItem);
$sqliteStorage->remove($item2->id);

$item3 = $sqliteStorage->find("id3")
    ->orElse(static fn() => new NotFound())
    ->tryUnwrap();

$allItems = $sqliteStorage->findAll();

Example Class for Items in Storage

use Phpolar\Phpolar\AbstractModel;

class Person extends AbstractModel
{
    #[PrimaryKey]
    #[Hidden]
    public string $id;

    public string $firstName;

    public string $lastName;

    public string $address1;

    public string $address2;

    public function getPrimaryKey(): string
    {
        return $id;
    }
}

Thresholds

Module Source Code Size * Memory Usage Required
phpolar/sqlite-storage 9 kB 150 kB x
  • Note: Does not include comments.

统计信息

  • 总下载量: 153
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固