Skip to content

The official LunaQL client for PHP (work in progress)

License

Notifications You must be signed in to change notification settings

OpenLunaQL/lunaql-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LunaQL PHP Client

This is a PHP client for the LunaQL NoSQL database.

Example

use LunaQL\Database;
use LunaQL\Config\DatabaseConfig;
use LunaQL\Builder\RelationshipBuilder;

$db = new Database(new DatabaseConfig(
    endpoint: "<endpoint>",
    token: '<token>'
));

$objectIDs = $db->query()
    ->from("users")
    ->limit(1)
    ->select(["_fk"])
    ->list("_fk");

$results = $db->query()
    ->from("users")
    ->where("_fk", "in", $objectIDs)
    ->hasMany("tasks", function (RelationshipBuilder $q) {
        $q->where('user_id', '=', '$._id')->orderBy('created_at', 'asc');
    })
    ->fetch();

var_dump($results);

Todo

  • Add tests
  • Implement error handling
  • Implement more query methods

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

About

The official LunaQL client for PHP (work in progress)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages