Download the PHP package tx-admin/hyperf-clickhouse without Composer

On this page you can find all versions of the php package tx-admin/hyperf-clickhouse. 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 hyperf-clickhouse

phpClickHouse-hyperf

Adapter to Hyperf framework of the most popular libraries:

Features

No dependency

More: https://github.com/smi2/phpClickHouse#features

Prerequisites

Installation

  1. Install via composer

  2. Add new connection into your config/database.php:

Then patch your .env:

  1. Used

You can use smi2/phpClickHouse functionality directly:

More about $db see here: https://github.com/smi2/phpClickHouse/blob/master/README.md

Or use dawnings of Eloquent ORM (will be implemented completely)

  1. Add model

  2. Add migration

  3. And then you can insert data

One row

Or bulk insert

Non assoc way

MyTable::insertBulk([['model 1', 1], ['model 2', 2]], ['model_name', 'some_param']);

Assoc way

MyTable::insertAssoc([['model_name' => 'model 1', 'some_param' => 1], ['some_param' => 2, 'model_name' => 'model 2']]);
  1. Now check out the query builder

Advanced usage

Retries You may enable ability to retry requests while received not 200 response, maybe due network connectivity problems.

Patch your .env:

CLICKHOUSE_RETRIES=2

retries is optional, default value is 0. 0 mean only one attempt. 1 mean one attempt + 1 retry while error (total 2 attempts).

Working with huge rows

You can chunk results like in Laravel

Buffer engine for insert queries See https://clickhouse.tech/docs/en/engines/table-engines/special/buffer/

If you also want to read from your buffer table, put its name in $table

OPTIMIZE Statement See https://clickhouse.com/docs/ru/sql-reference/statements/optimize/

Deletions

See https://clickhouse.com/docs/en/sql-reference/statements/alter/delete/

Using buffer engine and performing OPTIMIZE or ALTER TABLE DELETE


All versions of hyperf-clickhouse with dependencies

PHP Build Version
Package Version
Requires the-tinderbox/clickhouse-builder Version 6.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 tx-admin/hyperf-clickhouse contains the following files

Loading the files please wait ....