mrceperka/sql-file-loader

Load queries from big sql files

0.0.1 2017-11-17 13:23 UTC

This package is not auto-updated.

Last update: 2025-06-22 09:05:06 UTC


README

CircleCI

Installation

composer require mrceperka/sql-file-loader

Important notes

  • Statements in SQL file have to end with ;
  • Loader does NOT check the SQL syntax

Usage

<?php
use \MrCeperka\SqlFileLoader\SqlFileLoader;

$resource = __DIR__ . '/data.sql';
// or with stdin
// $resource = fopen('php://stdin', 'r');

$loader = new SqlFileLoader($resource);
$queries = $loader->getQueries();