Giter Site home page Giter Site logo

divengine / nodes Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 4.0 123 KB

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.

Home Page: https://divengine.org

License: GNU General Public License v3.0

PHP 100.00%
nosql-databases database php schema-directories storage-relational schema

nodes's Introduction

Div PHP Nodes 2.0.0

No-SQL Database System for PHP

Library for storage relational and serialized data using only PHP. The database can be divided into schemas. The objects (nodes) can be indexed for full text search and fast lookup.

Introduction

Many PHP applications use relational databases to store and retrieve application information by connecting to SQL database servers.

Alternatively applications can also store information in file base databases that do not require the use of SQL, the so called noSQL databases.

This class provides a pure PHP implementation of a noSQL database that stores and retrieves information in files.

It provides features to avoid problems caused by concurrent accesses such as the use of proper file locking, among other the non-trivial file database access features.

Description

This class can manage database of mixed values (atomic values, arrays, objects) named "nodes", stored in record files. It can create records that are stored in node files of a given schema directory.

Each node are serialized before storing the values in a file. Node files have a named defined by a identifier. Nodes may also reference other nodes in different schema directories.

The class may also:

  • search for nodes that match conditions,
  • check if a node exists,
  • update, delete and rename nodes already stored in record files,
  • lock node files to prevent changes
  • get, add and remove node references,
  • check if a schema directory exists,
  • create, rename and delete schema directories.
  • iterate each node with closure function
  • index the node's content for full text search
  • store statistics, and update it dynamically

Documentation

https://github.com/divengine/nodes/wiki

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!

--

@rafageist

https://rafageist.com

nodes's People

Contributors

rafageist avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

nodes's Issues

Search node query

Hi I tried to search for a node using a partial or full string, but not having any luck returning a node. Is this supported?

e.g. $db->search('something')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.