Download the PHP package sw-serv/relational-db without Composer

On this page you can find all versions of the php package sw-serv/relational-db. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package relational-db

This package provide advanced features to manipulate OpenSwoole\Table.

The heavy advantages of OpenSwoole\Table is heavy speed access : you can read about 2 million records in one second, and it is shared between processes.

This package intend to allow you to easy manage OpenSwoole\Table.

Registries

Table registry

Table registry is your entry point to small-swoole-db

You can :

Create a table

To create a table, use registry method :

Once the table is created in registry, you can add columns :

Only these type are accepted :

Note the size param is required, except for flot type

Now we have added the columns, we can create in memory :

The table is now ready to use as a OpenSwoole\Table object :

Foreign key

You can link two tables throw foreign key.

See OpenSwoole documentation for Table

Destroy a table

Once you don't need anymore table, you can destroy it to free all associated memory.

This will destroy table and remove it from registry

Persistence

When you need persistence for table, you can store table to a json file.

Soon, I will develop redis and mysql persistence but for now, use default persistence :

This will store table definition in a json file stored in /var/lib/small-swoole-db/data/testTable.json

To reload table from disk (at server restart for example) :

This will restore table in registry and memory with all data from last persist.

ParamRegistry

If you want, you can use ParamRegistry to change :

In this example, the testTable table will be stored in :

Selector

You can use selector to build complex requests.

Basically, you can select all records :

You can use where to add conditions :

You can also join result throw foreign keys :

And select any of fields (note that you can change record and persist easily) :

Testing

You must have docker installed to run tests.

To build unit-test container and run test suite, use command :

Once the container is build, you can quickly run test using :


All versions of relational-db with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
small/collection Version >=2.1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sw-serv/relational-db contains the following files

Loading the files please wait ....