Download the PHP package ray/query-module without Composer

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

Ray.QueryModule

codecov Type Coverage Continuous Integration

Japanese

Overview

Ray.QueryModule makes a query to an external media such as a database or Web API with a function object to be injected.

Motivation

Installation

Composer install

$ composer require ray/query-module

Module install

SQL files

$sqlDir/todo_insert.sql

$sqlDir/todo_item_by_id.sql

Convert SQL to SQL invocation object

A callable object injected into the constructor. Those object was made in specified sql with @Named binding.

Row or RowList

You can specify expected return value type is either Row or RowList with RowInterface or RowListInterface. RowInterface is handy to specify SQL which return single row.

Override the method with callable object

Entire method invocation can be override with callable object in specified with @Query.

When parameter name is different method arguments and Query object arguments, uri_template style expression can solve it.

Specify type='row' when single row result is expected to return.

If there is no SELECT result, it returns 404 Not Found.

Convert URI to Web request object

With WebQueryModule, it converts the URI bound in the configuration into an invocation object for web access and injects it. In the following example, an invocation object of $createTodo which makesPOST request to https://httpbin.org/todo is injected as $createTodo.

The usage code is the same as for SqlQueryModule.

The usage code of @Query does not change either.

Bind to PHP class

If other dependencies are needed, we bind to PHP class and use dependency as a service.

Bind to callable.

The usage codes are the same. The usage code of @Query does not change either.

ISO8601 DateTime Module

Convert the specified column name value to the ISO8601 format. In PHP, it is a format defined by constants of DateTime::ATOM. Install date column names as an array and pass it as an argument to Iso8601FormatModule.

SQL file name log

The SQL file name can be appended to the SQL statement as a comment. This is useful for query logging.

`

Execute SQL

`

Demo

BEAR.Sunday example


All versions of query-module with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
ext-json Version *
ext-pdo Version *
aura/sql Version ^3.0 | ^4.0 | ^5.0
bear/resource Version ^1.15
doctrine/annotations Version ^1.12
guzzlehttp/guzzle Version ^6.3 || ^7.0
koriym/query-locator Version ^1.4
ray/aop Version ^2.10.3
ray/aura-sql-module Version ^1.10.0
ray/di Version ^2.11
nikic/php-parser Version ^v4.13
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 ray/query-module contains the following files

Loading the files please wait ....