Download the PHP package drewlabs/rest-query without Composer

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

REST Query

This library provides a client side implementation of RESTful services query (similar to graphql) that allows developpers to easily customize data requested from web resources and directly sending complex query parameters to REST service.

Requirements The library only works with compatible web services. Therefore, developpers must provides an implementation that parses, compiles and process query send to the service.

Installation

Using composer PHP package manager:

composer require drewlabs/rest-query

Usage

Query builder

The library comes with a query builder class that provides a fluent interface for building and compiling queries. An example is as follow:

As seen above, the API comes with numerous fluent methods for defining query intention:

The eq method allow developpers to build a COLUMN=VALUE like query:

The neq is the inverse of the eq query method:

The lte and lt respectively allow developper to construct a query that check if a column value is less than (less than or equal to) a given value.

The gte and gt respectively allow developper to construct a query that check if a column value is greater than (greater than or equal to) a given value.

The in clause search for value that exists in a list of provided values:

The exists clause allow to query for relationship existance in the database.

The sort clause allow developpers to apply a sort by column on the result set:

Note The sort order is defined by an integer value. Any value greater than 0 get converted to ASC while any value less than 0 is converted to DESC

The select clause allows developpers to specify the list of columns to select from the query server:

The REST query client

The REST query client is an implementation similar to the query language from drewlabs/database library that provides 4 overloaded methods select(), update(), delete() and create(), sort sending CRUD action to endpoint servers.

It required drewlabs/curl-rest-client library for actually doing the http request to server. Therefore in order to use the rest query client, developpers are required to execute the following command to install the required dependencies:

composer require drewlabs/curl-rest-client


All versions of rest-query with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
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 drewlabs/rest-query contains the following files

Loading the files please wait ....