polidog/query-locator-bundle

1.0.2 2018-09-06 15:47 UTC

This package is auto-updated.

Last update: 2024-11-21 20:25:31 UTC


README

Build Status QueryLocatoer for Symfony Bundle.
using Koriym.QueryLocator.

Installation

Composer install

$ composer require polidog/query-locator-bundle

Usage

app/config.yml

polidog_query_locator:
    locators:
        user_queries:
            sql_dir: "../../sqldir"
            use_apc: false # Default to false.

Get Container

$query = $container->get('polidog_query_locator.locators.user_queries') // QueryLocator
$sql = $query['admin/user'];
$sql = $query->getCountQuery('admin/user'); 

SQL files

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

Requirements

  • PHP 5.6+