cleantalk/btree_database 问题修复 & 功能扩展

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

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

cleantalk/btree_database

最新稳定版本:1.2.3

Composer 安装命令:

composer require cleantalk/btree_database

包简介

CleanTalk binary tree database package.

README 文档

README

Install

composer require cleantalk/btree_database

Using

Connect database to your project:

<?php

use Cleantalk\Common\BtreeDatabase\FileDB;

//require initialization and autoloader
require_once 'vendor/autoload.php';

$db_location = __DIR__ . '/data';

// Example array contains networks
$data = array(
    'network'     => '2130706433',
    'mask'        => '4294967295',
    'status'      => 1,
    'is_personal' => 0,
);


try {
    // Instantiate the DB main controller
    $file_db = new FileDB('fw_nets', $db_location);

    // Prepare and insert data using fluid interface
    $insert = $file_db->prepareData(array($data))->insert();

    // Perform request using fluid interface
    $db_results = $file_db
        ->setWhere( array( 'network' => array('2130706433'), ) )
        ->setLimit( 0, 20 )
        ->select( 'network', 'mask', 'status', 'is_personal' );
        
    //Use ->delete to delete database
    //$file_db->delete();
} catch (\Exception $e) {
    print $e->getMessage();
}

var_dump($db_results);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2023-04-14