Skip to content

Commit 15d6028

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # README.md
2 parents 2fd7b4b + fc48a3f commit 15d6028

File tree

17 files changed

+289
-204
lines changed

17 files changed

+289
-204
lines changed

README.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
1-
# laravel-clickhouse
1+
# Laravel Clickhouse
2+
23
[![Build Status](https://travis-ci.org/bavix/laravel-clickhouse.svg?branch=master)](https://travis-ci.org/bavix/laravel-clickhouse)
3-
[![StyleCI](https://styleci.io/repos/112756298/shield?branch=master)](https://styleci.io/repos/112756298)
4+
[![StyleCI](https://styleci.io/repos/269384604/shield?branch=master)](https://styleci.io/repos/269384604)
45
[![Coverage Status](https://coveralls.io/repos/github/bavix/laravel-clickhouse/badge.svg)](https://coveralls.io/github/bavix/laravel-clickhouse)
56

6-
Eloquent model for ClickHouse
7+
[![Package Rank](https://phppackages.org/p/bavix/laravel-clickhouse/badge/rank.svg)](https://packagist.org/packages/bavix/laravel-clickhouse)
8+
[![Latest Stable Version](https://poser.pugx.org/bavix/laravel-clickhouse/v/stable)](https://packagist.org/packages/bavix/laravel-clickhouse)
9+
[![Latest Unstable Version](https://poser.pugx.org/bavix/laravel-clickhouse/v/unstable)](https://packagist.org/packages/bavix/laravel-clickhouse)
10+
[![License](https://poser.pugx.org/bavix/laravel-clickhouse/license)](https://packagist.org/packages/bavix/laravel-clickhouse)
11+
[![composer.lock](https://poser.pugx.org/bavix/laravel-clickhouse/composerlock)](https://packagist.org/packages/bavix/laravel-clickhouse)
12+
13+
Laravel Clickhouse - Eloquent model for ClickHouse.
14+
15+
* **Vendor**: bavix
16+
* **Package**: Laravel Clickhouse
17+
* **Version**: [![Latest Stable Version](https://poser.pugx.org/bavix/laravel-clickhouse/v/stable)](https://packagist.org/packages/bavix/laravel-clickhouse)
18+
* **Laravel Version**: `6.x`, `7.x`, `8.x`
19+
* **PHP Version**: 7.2+
20+
* **[Composer](https://getcomposer.org/):** `composer require bavix/laravel-clickhouse`
721

822
> :warning:If you are using php 8 and `the-tinderbox/clickhouse-*` author hasn't added support yet, then connect mine.
923
>
1024
> composer req bavix/clickhouse-php-client
1125
>
1226
> composer req bavix/clickhouse-builder
1327
14-
## Prerequisites
15-
- php 7.2
16-
- clickhouse server
17-
18-
## Installation
28+
## Get started
1929
```sh
2030
$ composer require bavix/laravel-clickhouse
2131
```
@@ -24,6 +34,7 @@ Then add the code above into your config/app.php file providers section
2434
```php
2535
Bavix\LaravelClickHouse\ClickHouseServiceProvider::class,
2636
```
37+
2738
And add new connection into your config/database.php file. Something like this:
2839
```php
2940
'connections' => [
@@ -41,6 +52,7 @@ And add new connection into your config/database.php file. Something like this:
4152
]
4253
]
4354
```
55+
4456
Or like this, if clickhouse runs in cluster
4557
```php
4658
'connections' => [
@@ -98,8 +110,7 @@ Payment::select(raw('count() AS cnt'), 'payment_system')
98110

99111
```
100112

101-
## Roadmap
102-
- more tests
103-
- Model::with() method
104-
- relations
113+
---
114+
Supported by
105115

116+
[![Supported by JetBrains](https://cdn.rawgit.com/bavix/development-through/46475b4b/jetbrains.svg)](https://www.jetbrains.com/)

src/ClickHouseServiceProvider.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44

55
namespace Bavix\LaravelClickHouse;
66

7-
use Illuminate\Database\DatabaseManager;
8-
use Illuminate\Support\ServiceProvider;
97
use Bavix\LaravelClickHouse\Database\Connection;
108
use Bavix\LaravelClickHouse\Database\Eloquent\Model;
9+
use Illuminate\Database\DatabaseManager;
10+
use Illuminate\Support\ServiceProvider;
1111

1212
class ClickHouseServiceProvider extends ServiceProvider
1313
{
1414
/**
15-
* @return void
1615
* @throws
16+
*
17+
* @return void
1718
*/
1819
public function boot(): void
1920
{

src/Database/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
namespace Bavix\LaravelClickHouse\Database;
66

7+
use Bavix\LaravelClickHouse\Database\Query\Builder;
78
use Bavix\LaravelClickHouse\Database\Query\Pdo;
89
use Tinderbox\ClickhouseBuilder\Query\Grammar;
9-
use Bavix\LaravelClickHouse\Database\Query\Builder;
1010

1111
class Connection extends \Tinderbox\ClickhouseBuilder\Integrations\Laravel\Connection
1212
{

0 commit comments

Comments
 (0)