churakovmike/laravel-clickhouse
最新稳定版本:v0.4
Composer 安装命令:
composer require churakovmike/laravel-clickhouse
包简介
Eloquent extension with Clickhouse
README 文档
README
Requirements
- laravel 7+
- php 7.4+
Install
composer require churakovmike/laravel-clickhouse
If you need the latest version
composer require churakovmike/laravel-clickhouse:dev-main
Integrations
In config/app.php add:
'providers' => [ ... \ChurakovMike\LaravelClickHouse\ClickhouseServiceProvider::class, ... ]
Connection configures via config/database.php
Clickhouse default configuration example:
'connections' => [ 'clickhouse' => [ 'driver' => 'clickhouse', 'host' => 'http://127.0.0.1', 'port' => 8123, 'database' => 'database_name', 'username' => 'default', 'password' => '', 'options' => [ 'timeout' => 10, ] ] ]
Usage
Create new own model and inherit from the new model
<?php namespace App; use ChurakovMike\LaravelClickHouse\Database\Model; class Events extends Model { // ... }
That's all, you can work with clickhouse using the familiar Eloquent model.
Following features coming soon
- Clusters switching
- Server switching
- Native clickhouse functions for the model (sumIf, countIf, quantilesTimingIf, argMinIf and etc.)
- New migration manager and new Blueprint for Clickhouse
- New data types for queries
统计信息
- 总下载量: 134
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-10-09