承接 dikki/database 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

dikki/database

最新稳定版本:0.0.1.1

Composer 安装命令:

composer require dikki/database

包简介

An experimental and simple NoSQL database written in PHP.

README 文档

README

This is an experimental and simple NoSQL database written in PHP. It is designed to be used in read-heavy (small to medium size) sites where the read performance is more important than the write performance.

Documentation [WIP]

Installation

composer require dikki/database

Usage

<?php

require_once __DIR__ . '/../vendor/autoload.php';

// Initialize the database
$db = new PHPNoSQL\Database(dirname(__DIR__) . '/database');

// Basic CRUD operations
$id = $db->users->save(['name' => 'John', 'age' => 30]);
$user = $db->users->find($id);
$db->users->delete($id);

// Get all documents in a collection
$allUsers = $db->users->all();

// Create an index
$db->users->createIndex('age_index', ['age']);

// Query using an index
$youngUsers = $db->users->query('age_index', ['age' => [18, 25]]);

// Magic findBy methods
$johnsUsers = $db->users->findByName('John');

// Batch operations
$db->users->beginBatch();
$db->users->save(['name' => 'User 1']);
$db->users->save(['name' => 'User 2']);
$db->users->endBatch();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-05