PHPackages                             meysampg/eql - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. meysampg/eql

Abandoned → [paknahad/eql](/?search=paknahad%2Feql)Library[Search &amp; Filtering](/categories/search)

meysampg/eql
============

SQL into DSL (Write SQL, Search on ElasticSearch)

716[1 PRs](https://github.com/meysampg/eql/pulls)PHPCI passing

Since Dec 18Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/meysampg/eql)[ Packagist](https://packagist.org/packages/meysampg/eql)[ RSS](/packages/meysampg-eql/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

```

EEEEEEEEEEEEEEEEEEEEEE     QQQQQQQQQ     LLLLLLLLLLL
E::::::::::::::::::::E   QQ:::::::::QQ   L:::::::::L
E::::::::::::::::::::E QQ:::::::::::::QQ L:::::::::L
EE::::::EEEEEEEEE::::EQ:::::::QQQ:::::::QLL:::::::LL
  E:::::E       EEEEEEQ::::::O   Q::::::Q  L:::::L
  E:::::E             Q:::::O     Q:::::Q  L:::::L
  E::::::EEEEEEEEEE   Q:::::O     Q:::::Q  L:::::L
  E:::::::::::::::E   Q:::::O     Q:::::Q  L:::::L
  E:::::::::::::::E   Q:::::O     Q:::::Q  L:::::L
  E::::::EEEEEEEEEE   Q:::::O     Q:::::Q  L:::::L
  E:::::E             Q:::::O  QQQQ:::::Q  L:::::L
  E:::::E       EEEEEEQ::::::O Q::::::::Q  L:::::L         LLLLLL
EE::::::EEEEEEEE:::::EQ:::::::QQ::::::::QLL:::::::LLLLLLLLL:::::L
E::::::::::::::::::::E QQ::::::::::::::Q L::::::::::::::::::::::L
E::::::::::::::::::::E   QQ:::::::::::Q  L::::::::::::::::::::::L
EEEEEEEEEEEEEEEEEEEEEE     QQQQQQQQ::::QQLLLLLLLLLLLLLLLLLLLLLLLL
                                   Q:::::Q
                                    QQQQQQ

```

[![Build Status](https://camo.githubusercontent.com/c22a1ef69d468dcbcfc1e0cb747325863d80e3bdab7f9760e8e5f63d7ea11a91/68747470733a2f2f7472617669732d63692e6f72672f6d657973616d70672f65716c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/meysampg/eql)[![Maintainability](https://camo.githubusercontent.com/b01cd89901cf37452061f22294aef50e25098184de01c35b5abea31cd372ab13/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f63333337376561303137623633326430303332302f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/meysampg/eql/maintainability)[![Test Coverage](https://camo.githubusercontent.com/0309f8b2eb355f1c59d613855617bfe0d8ba7b1950bd263fa4b67a57cad33635/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f63333337376561303137623633326430303332302f746573745f636f766572616765)](https://codeclimate.com/github/meysampg/eql/test_coverage)

Overview
--------

[](#overview)

This project will a try to be a `php` equivalent of [elasticsql](https://github.com/cch123/elasticsql).

Currently support:

- sql and expression
- sql or expression
- equal(=) support
- not equal(!=) support
- gt(&gt;) support
- gte(&gt;=) support
- lt(&lt;) support
- lte(&lt;=) support
- sql in (eg. id in (1,2,3) ) expression
- sql not in (eg. id not in (1,2,3) ) expression
- paren bool support (eg. where (a=1 or b=1) and (c=1 or d=1))
- sql like expression (currently use match phrase, perhaps will change to wildcard in the future)
- sql order by support
- sql limit support
- sql not like expression
- field missing check
- support aggregation like count(\*), count(field), min(field), max(field), avg(field)
- support aggregation like stats(field), extended\_stats(field), percentiles(field) which are not standard sql function
- null check expression(is null/is not null)
- join expression
- having support

Usage
-----

[](#usage)

`> composer require meysampg/eql`

Demo :

```
