Skip to content

No-SQL Database System for PHP. Is a library for storage relational and serialized data using only PHP. The data can be organized into schemas.

License

Notifications You must be signed in to change notification settings

divengine/nodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Div PHP Nodes

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Div PHP Nodes is a PHP library for storing relational and serialized data without the need for an external server. The data is organized into schemas, and each object (or "node") can be indexed for full-text search and fast lookup.

This class manages file-based databases and provides mechanisms to avoid concurrency issues using file locking. Additionally, it allows:

  • Creating, updating, deleting, renaming, and searching for nodes.
  • Referencing nodes across different schemas.
  • Iterating over nodes using closure functions.
  • Indexing node content for quick searches.
  • Storing and dynamically updating statistics.
  • Managing schemas: creating, renaming, and deleting schema directories.

Installation

With composer...

composer require divengine/nodes

Without composer, download the class and...

include "path/to/divengine/nodes.php";

Basic usage

<?php

use divengine/nodes;

$db = new nodes("database/contacts");

$id = $db->addNode([
    "name" => "Peter",
    "age" => 25
]);

$db->setNode($id, [
    "email" => "[email protected]",
    "phone" => "+1222553335"
]);

$contact = $db->getNode($id);

$db->delNode($id);

Enjoy!

Documentation

About

No-SQL Database System for PHP. Is a library for storage relational and serialized data using only PHP. The data can be organized into schemas.

Topics

Resources

License

Stars

Watchers

Forks

Languages