Download the PHP package ucscode/pairs without Composer

On this page you can find all versions of the php package ucscode/pairs. 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 pairs

Pairs Library Documentation

The Pairs library is a PHP tool designed to efficiently store and retrieve key-value pairs in a database. It provides a simple and flexible interface for managing data in a relational database. Below is a comprehensive guide on how to use the library.

Dedication

This library was initially a part of User Synthetics project but was extracted to become a standalone project.

Table of Contents

Introduction

The Pairs class allows you to create a meta table that consists of key-value pairs. Each row in the table represents a unique combination of key and reference ID, allowing you to store and retrieve data in a flexible and efficient manner. The class also supports linking the meta table to a parent table using foreign keys for data integrity and consistency.

Features

Requirements

Installation

Usage

Initialization

Set a Key-Value Pair

This sets the key "car" with the value "toyota" for the reference (owner) 2.

Retrieve a Value

This retrieves the value for the key "car" and reference 2.

Retrieve a Timestamp

This retrieves the unix timestamp representing when the initial value for the specified key and reference was added to the database.

Remove a Key-Value Pair

This removes the key-value pair for the key "car" and reference 2.

Get All Pairs

This retrieves all available data grouped by reference.

Get Pairs by Reference

This retrieves all data for reference 2.

Get Pairs by Key Pattern

This retrieves all data for reference 2 whose key matches words starting from "user-"

Foreign Constraints

This sets up a foreign constraint where "parentTableName" becomes the parent table, and the pairs table becomes the child.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for more information.


All versions of pairs with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ucscode/squery Version ^3.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 ucscode/pairs contains the following files

Loading the files please wait ....