koriym/query-locator

A SQL query locator

1.4.0 2018-12-28 16:26 UTC

This package is auto-updated.

Last update: 2020-04-28 19:28:21 UTC


README

Scrutinizer Code Quality Code Coverage Build Status

Installation

Composer install

$ composer require koriym/query-locator

Usage

use Koriym\QueryLocator\QueryLocator;

$query = new QueryLocator($sqlDir);
$sql = $query['admin/user'];                // SELECT * FROM user;
$sql = $query->getCountQuery('admin/user'); // SELECT COUNT(*) FROM user;

SQL files

└── sql
    └── admin
        └── user.sql