opinqzz/databasemanager

There is no license information available for the latest version (dev-main) of this package.

A Database Managing Library Made By Pixals Lead Developer

dev-main 2024-09-18 18:52 UTC

This package is auto-updated.

Last update: 2024-10-18 19:14:27 UTC


README

Easy Way to Execute and Fetch Queries Using LibSQL By cooldogdev

API Implementation

  • Installation Using Composer composer require opinqzz/databasemanager dev-main
$database_manager = new DatabaseManager;
$database_manager->connectDB($ip, $username, $password, $database, $port, $this);

For Intialization in php onEnable() : void {}

  • For Executing a Query:

       $database_manager->getQueriesManager()->executeQuery(
              "INSERT INTO MeowTest VALUES ('gcape_name', ':cape_test');",
              [
                  "type" => "execute"
              ],
              [
                  "gcape_name" => "meow2",
                  ":cape_test" => "mewo32"
              ]
          );
  • For Fetching a Query ( Using Await Generators By SoFE ):

       Await::f2c(function() use ($database_manager) {
              $result = yield from Await::promise(fn($accept, $refuse) => $database_manager->getQueriesManager()->fetchQuery("SELECT * FROM MeowTesting WHERE player_name = 'pname'", ["type" => "fetch"], ["pname" => "oPinqzz"], $accept, $refuse));
              echo $result["player_xuid"];
          });  

Leave A Star !

All Copyrights For oPinqzz / You cannot Re sell this Library