SQL database access through PDO.

Overview

Aura.Sql

Provides an extension to the native PDO along with a profiler and connection locator. Because ExtendedPdo is an extension of the native PDO, code already using the native PDO or typehinted to the native PDO can use ExtendedPdo without any changes.

Added functionality in Aura.Sql over the native PDO includes:

  • Lazy connection. ExtendedPdo connects to the database only on method calls that require a connection. This means you can create an instance and not incur the cost of a connection if you never make a query.

  • Decoration. DecoratedPdo can be used to decorate an existing PDO instance. This means that a PDO instance can be "extended" at runtime to provide the ExtendedPdo behaviors.

  • Array quoting. The quote() method will accept an array as input, and return a string of comma-separated quoted values.

  • New perform() method. The perform() method acts just like query(), but binds values to a prepared statement as part of the call. In addition, placeholders that represent array values will be replaced with comma- separated quoted values. This means you can bind an array of values to a placeholder used with an IN (...) condition when using perform().

  • New fetch*() methods. The new fetch*() methods provide for commonly-used fetch actions. For example, you can call fetchAll() directly on the instance instead of having to prepare a statement, bind values, execute, and then fetch from the prepared statement. All of the fetch*() methods take an array of values to bind to to the query statement, and use the new perform() method internally.

  • New yield*() methods. These are complements to the fetch*() methods that yield results instead of returning them.

  • Exceptions by default. ExtendedPdo starts in the ERRMODE_EXCEPTION mode for error reporting instead of the ERRMODE_SILENT mode.

  • Profiler. An optional query profiler is provided, along with an interface for other implementations, that logs to any PSR-3 interface.

  • Connection locator. A optional lazy-loading service locator is provided for picking different database connections (default, read, and write).

Installation and Autoloading

This package is installable and PSR-4 autoloadable via Composer as aura/sql.

Alternatively, download a release, or clone this repository, then map the Aura\Sql\ namespace to the package src/ directory.

Dependencies

This package requires PHP 5.6 or later; it has also been tested on PHP 7 and HHVM. We recommend using the latest available version of PHP as a matter of principle.

Aura library packages may sometimes depend on external interfaces, but never on external implementations. This allows compliance with community standards without compromising flexibility. For specifics, please examine the package composer.json file.

Quality

Scrutinizer Code Quality Code Coverage Build Status PDS Skeleton

This project adheres to Semantic Versioning.

To run the unit tests at the command line, issue composer install and then ./vendor/bin/phpunit at the package root. (This requires Composer to be available as composer.)

This package attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request.

Community

To ask questions, provide feedback, or otherwise communicate with other Aura users, please join our Google Group, follow @auraphp, or chat with us on Freenode in the #auraphp channel.

Documentation

This package is fully documented here.

Comments
  • Remove

    Remove "Lazy" ExtendedPdo in 3.x

    It occurs to me that there are better ways to manage laziness of connections, than by having the connection manage itself. Providing a Factory or Container that only creates an ExtendedPdo on demand, rather than the LazyExtendedPdo instance creating its own internal connection on demand, would support a better separation of concerns. While this reduces the ability of older codebases to migrate directly to 3.x to get the benefits of lazy connection, the 2.x lazy connection remains available for that purpose; further, it streamlines and simplifies the ExtendedPdo logic itself.

    @pavarnos @harikt and others: thoughts?

    EDIT: Proof of concept branch in https://github.com/auraphp/Aura.Sql/tree/nonlazy .

    opened by pmjones 23
  • Query\Mysql\Select with SQL_CALC_FOUND_ROWS and other mysql-specific flags

    Query\Mysql\Select with SQL_CALC_FOUND_ROWS and other mysql-specific flags

    Query\Mysql\Select with such options HIGH_PRIORITY STRAIGHT_JOIN SQL_CALC_FOUND_ROWS SQL_CACHE SQL_NO_CACHE SQL_SMALL_RESULT SQL_BIG_RESULT SQL_BUFFER_RESULT

    opened by MAXakaWIZARD 23
  • Add statement iterator

    Add statement iterator

    Currently the fetchAll can be used to get all data from statement execution as an array. This unfortunately will result in out of memory error, when:

    • there is a lot of data
    • consumer of data needs only 1 row at a time to process it

    Proposing to add several iterators, that would:

    1. accept PDOStatement in constructor
    2. while used will emulate output of fetchAll, fetchAssoc or even fetchCol

    I've created them for a FOSS project of mine, but why not having something like this built-in in this great package.

    Related Resources:

    • http://qa.in-portal.org/diffusion/INP/browse/branches%252F5.2.x/in-portal/branches/5.2.x/core/kernel/db/db_connection.php;16347$1238-1519
    • http://www.dragonbe.com/2015/07/speeding-up-database-calls-with-pdo-and.html
    opened by aik099 21
  • Version that doesn't throw deprecation warnings in 8.1 but works in 8.0?

    Version that doesn't throw deprecation warnings in 8.1 but works in 8.0?

    I realize I'm coming in on the tail end of this discussion, but is there any reason that 5.x couldn't work with PHP 8.0? Right now you can either use 3.x, which throws a bunch of deprecation warnings in 8.1, or 5.x, which is incompatible with 8.0, so there's no way to set up a codebase using Aura.Sql that'll run cleanly on both. Ideally I want to make all the code changes I need for forward compat under 8.0, then when 8.1.1 is released the only thing I have to do is update our Dockerfile base and push the result out to prod.

    If there's a technical reason Aura.Sql 5.x can't work with 8.0, and I just missed it, fair enough, but figured I'd ask so others don't have to.

    opened by iansltx 19
  • Issue 104

    Issue 104

    Here is a first version of a solution to the first two problems reported in Issue 104. To handle the ? operator as the problem is also found when using pure PDO would require to analyze the statement detail and replace the operator with the corresponding function depending on the type of the left and right arguments.

    The Rebuilder has been modified as to not require a PDO instance: when a passed value is an array, instead of replacing its placeholder by a csv string of quoted values it creates a csv string of placeholders.

    Instead of using regular expression to split the statement it goes through it character by character and when a special one is found it calls a function to handle it. The Rebuilder->statementPartsHandlers contains those callables with the character to find as key.

    To create Rebuilder for a database vendor you have to implement the RebuilderInterface.

    opened by JLacoude 19
  • how to use Aura.Sql.Adapter.Abstract::update to auto increase field???

    how to use Aura.Sql.Adapter.Abstract::update to auto increase field???

    method declare:

    public function update($table, array $cols, $cond, array $data = array())
    

    if i want to increase count field by 1, i will use update() like this:

    update("tbl_name", array('count' => 'count+1", "uid=1");
    

    it will generate sql like:

    set count='count+1'
    

    cause data type of field count is "int", so it will convert 'count+1' to 0.

    so what can i do?

    opened by guweigang 19
  • Support PHP 8 on Aura.Sql 2.x

    Support PHP 8 on Aura.Sql 2.x

    This release adds PHP 8 support until we migrate to the 3.x version.

    Minimum required PHP version has been increased from 5.3 to 5.6 to make it possible.

    opened by sudo-plz 17
  • What is the future of this project?

    What is the future of this project?

    What is the future of this project? In my opinion, it is feature complete and only needs to have the latest versions of PHP (7.3, 7.4 & 8.0 as of this writing) tested via travis or Github Actions to ensure it continues to work with the currently supported version of PHP. Will anyone be updating the CI tests for this project?

    opened by rotexdegba 15
  • yield with fetch*() functions

    yield with fetch*() functions

    Hi Paul. Interested in your opinion on the value of using generators to reduce the memory footprint / increase performance. http://php.net/manual/en/language.generators.syntax.php eg fetchAssoc()

            // ...
            while ($row = $sth->fetch(self::FETCH_ASSOC)) {
                $key = current($row);
                yield $key => call_user_func($callable, $row);
            }
    
    Featured-request 
    opened by pavarnos 13
  • Extended PDO

    Extended PDO

    Hi Paul,

    I was looking into the fetchAll method of the extended PDO and the fetchAll method of the normal PDO.

    /**
     * 
     * Fetches a sequential array of rows from the database; the rows
     * are represented as associative arrays.
     * 
     * @param string $statement The SQL statement to prepare and execute.
     * 
     * @param array $values Values to bind to the query.
     * 
     * @param callable $callable A callable to be applied to each of the rows
     * to be returned.
     * 
     * @return array
     * 
     */
    public function fetchAll($statement, array $values = array(), $callable = null)
    {
        $this->bindValues($values);
        $sth = $this->query($statement);
        $data = $sth->fetchAll(self::FETCH_ASSOC);
        if ($callable) {
            foreach ($data as $key => $row) {
                $data[$key] = call_user_func($callable, $row);
            }
        }
        return $data;
    }
    

    http://www.php.net/manual/en/pdostatement.fetchall.php

    public array PDOStatement::fetchAll ([ int $fetch_style [, mixed $fetch_argument [, array $ctor_args = array() ]]] )
    

    You can see in ExtendedPdo they will not get a chance to make the class bind to the return values. Will it be good, if we can make optional arguments as that of fetchAll method signature ?

    http://php.net/manual/en/pdostatement.setfetchmode.php

    This is with respect to my recent experiment on fetchMode.

    <?php
    require __DIR__ . '/vendor/autoload.php';
    
    class PollChoice 
    {
        protected $id;
        protected $poll_id;
        protected $choice_text;
        protected $votes;
    
        public function __get($key)
        {
            return $this->{$key};
        }
    
        public function __set($key, $value)
        {
            $this->{$key} = $value;
        }
    }
    
    use Aura\Sql\ExtendedPdo;
    use Aura\Sql\Profiler;
    
    $pdo = new ExtendedPdo(
        'mysql:host=localhost;dbname=dbname',
        'username',
        'password',
        array(), // driver options as key-value pairs
        array()  // attributes as key-value pairs
    );
    
    $sql = 'SELECT * FROM polls_choice WHERE id IN (:id) AND poll_id = :poll_id';
    
    $bind = array(
        'id' => array('1', '2'),
        'poll_id' => '1',
    );
    $pdo->bindValues($bind);
    $results = $pdo->query($sql, PDO::FETCH_CLASS, 'PollChoice');
    foreach ($results as $result) {
        echo "Query Result : " . $result->choice_text . PHP_EOL;
    }
    

    Let me know your thoughts.

    opened by harikt 13
  • Inserting NULL values?

    Inserting NULL values?

    This is probably the wrong place to ask this, though hopefully you can help. I googled around and found a lot of information about working with the base PDO object and inserting (or updating) database cells to a NULL value, but I haven't been able to figure out how to do it with using Aura.Sql and it's underlying ExtendedPdo object.

    I've tried sending NULL, null, '', 'NULL', and PDO::PARAM_NULL but most of the time I either get type errors (e.g. trying to insert 'NULL' into a numeric cell) or zero (when using PDO::PARAM_NULL since that's the value of that constant).

    Any advice?

    Thanks for your time, Dash

    opened by dashifen 11
  • Auto adding Ticks

    Auto adding Ticks

    This is so annoying, for example using: @@session.time_zone will add ticks to session and time_zone, like this @@`session`.`time_zone`. Is there a way I can disable this feature? This also happens if you use count(distinct x) and many more cases.

    opened by php- 5
  • DB Reconnection

    DB Reconnection

    Hi All, I'm looking at aura as a base for replacing some older code in one of my projects.

    One of the items we implemented was reconnection, but I see there is nothing mentioned of it in any issues and it isnt in the code. (I have seen some other wrappers that do implement it).

    Is there any reason why automatice reconnection isnt implemented? Is there any recommendation on how to implement this? (i.e. using aura as a decorator for a pdo wrapper that just reconnects? extending aura itself?)

    Would there be any interest in this if I were to implement it? (if so I'd be willing to submit a pr)

    opened by roynasser 5
  • Bug with pgsql query

    Bug with pgsql query

    If you will try to do this:

    $pdo->fetchCol("SELECT id FROM table WHERE removed = false AND data @> '{\"is_hidden\":false}'::jsonb AND type in (:types)", ['types' => [1, 2]]);

    you will get an error from DB: SQLSTATE[08P01]: <<Unknown error>>: 7 ERROR: bind message supplies 0 parameters, but prepared statement "pdo_stmt_00000001" requires 1

    And this is because :types will be skipped here.

    opened by chekalsky 5
Releases(3.1.0)
  • 3.1.0(Apr 28, 2022)

    • Continous Integration Improvements via #184, #197 by @koriym
    • PHP 8.x support via #185, #209, #214 by @koriym, @harikt
    • Support psr/log v1 and v2 via #191 by @r4ndsen
    • Fixed #183 (Bug in sqlite query parser to support : in column name) via #203, #211 by @r4ndsen, @harikt
    Source code(tar.gz)
    Source code(zip)
  • 5.0.1(Feb 19, 2022)

  • 4.0.0(Jan 27, 2022)

    Version 4.x supports PHP 7.2 and up.

    What's Changed

    • Add 7.2, 7.3 and 7.4 to test targets by @koriym in https://github.com/auraphp/Aura.Sql/pull/184
    • remove unused param in queryparser by @r4ndsen in https://github.com/auraphp/Aura.Sql/pull/180
    • PHP 8 Support by @koriym in https://github.com/auraphp/Aura.Sql/pull/185
    • allow psr/log v2 by @r4ndsen in https://github.com/auraphp/Aura.Sql/pull/191
    • Compatibility with PHP 8.1 by @srjlewis in https://github.com/auraphp/Aura.Sql/pull/193
    • Update PHPDoc by @kenjis in https://github.com/auraphp/Aura.Sql/pull/196
    • Migrate Travis to GitHub Actions by @koriym in https://github.com/auraphp/Aura.Sql/pull/197
    • Update GitHub Actions for 5.x by @kenjis in https://github.com/auraphp/Aura.Sql/pull/198
    • Enable PHP 7.2-8.1 compat by @iansltx in https://github.com/auraphp/Aura.Sql/pull/202

    New Contributors

    • @r4ndsen made their first contribution in https://github.com/auraphp/Aura.Sql/pull/180
    • @srjlewis made their first contribution in https://github.com/auraphp/Aura.Sql/pull/193

    Full Changelog: https://github.com/auraphp/Aura.Sql/compare/3.0.0...4.0.0

    Source code(tar.gz)
    Source code(zip)
  • 5.0.0(Jan 27, 2022)

    Version 5.x supports PHP 8.1 and up.

    What's Changed

    • remove unused param in queryparser by @r4ndsen in https://github.com/auraphp/Aura.Sql/pull/180
    • PHP 8 Support by @koriym in https://github.com/auraphp/Aura.Sql/pull/185
    • allow psr/log v2 by @r4ndsen in https://github.com/auraphp/Aura.Sql/pull/191
    • Compatibility with PHP 8.1 by @srjlewis in https://github.com/auraphp/Aura.Sql/pull/193
    • Update PHPDoc by @kenjis in https://github.com/auraphp/Aura.Sql/pull/196
    • Migrate Travis to GitHub Actions by @koriym in https://github.com/auraphp/Aura.Sql/pull/197
    • Update GitHub Actions for 5.x by @kenjis in https://github.com/auraphp/Aura.Sql/pull/198
    • docs: update README for 5.x by @kenjis in https://github.com/auraphp/Aura.Sql/pull/200

    New Contributors

    • @r4ndsen made their first contribution in https://github.com/auraphp/Aura.Sql/pull/180
    • @srjlewis made their first contribution in https://github.com/auraphp/Aura.Sql/pull/193
    • @kenjis made their first contribution in https://github.com/auraphp/Aura.Sql/pull/196

    Full Changelog: https://github.com/auraphp/Aura.Sql/compare/3.0.0...5.0.0

    Source code(tar.gz)
    Source code(zip)
  • 2.6.0(Aug 15, 2018)

    This release adds two new off-interface methods to ConnectionLocator:

    • setProfiling() to activate profiling across all connections

    • getProfiles() to get the profiles from all connections

    Source code(tar.gz)
    Source code(zip)
  • 2.5.3(Aug 2, 2018)

  • 3.0.0(Jun 11, 2018)

    • Fixed issue #163: Add getAttribute and setAttribute functions to make sure pdo is connected before calling the functions

    • Merged pull request #170: fixes error "Class 'Aura\Sql\PDO' not found"

    • Merged pull request #174: fixes bug with null value.

    Source code(tar.gz)
    Source code(zip)
  • 2.5.2(Mar 4, 2018)

    • Fix #111 : Binding variables conflicts with some Postgres SQL queries
    • Added phpunit to composer.json
    • Fix #166 : PHPStorm exception handling check
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0-beta1(Jun 28, 2017)

    First beta release.

    • Updated documentation, and added a Bookdown JSON file.

    • The sqlsrv driver now defaults to exceptions like all other drivers.

    Source code(tar.gz)
    Source code(zip)
  • 3.0.0-alpha1(Mar 9, 2017)

  • 2.5.1(Oct 3, 2016)

  • 2.5.0(May 2, 2016)

    This release adds new yield*() methods to ExtendedPdo; these return iterators to generate one result row at a time, which can reduce memory usage with very large result sets.

    Source code(tar.gz)
    Source code(zip)
  • 2.4.3(Mar 27, 2015)

  • 2.4.2(Mar 16, 2015)

  • 2.4.1(Mar 3, 2015)

  • 2.4.0(Feb 9, 2015)

    The previous release changed the ExtendedPdoInterface by adding a new disconnect() method. That was an unintentional BC break to existing implementations of the interface. This release corrects that break by removing the disconnect() method from the interface, while leaving it in the implementation.

    Source code(tar.gz)
    Source code(zip)
  • 2.3.0(Feb 3, 2015)

    • ADD: ExtendedPdo::disconnect() method to close connections explicitly. This does not work for injected PDO connection objects, which should be managed from their creation point, not as part of ExtendedPdo. Thanks to both Jacob Emerick and Jacques Woodcock for their initial implementations.
    • CHG: ExtendedPdo::bindValue() now throws Exception\CannotBindValue when it encounters a non-bindable value. This helps with debugging values that make their way down to the PDO layer, which PDO cannot bind.
    Source code(tar.gz)
    Source code(zip)
  • 2.2.1(Jan 19, 2015)

  • 2.2.0(Jan 17, 2015)

    • SEC: ExtendedPdo no longer enables self::ATTR_EMULATE_PREPARES by default; this is to avoid security holes when using emulation.
    • REF: Extract the statement-rebuilding logic to its own Rebuilder class
    • ADD: ExtendedPdo::fetchGroup() functionality.
    • ADD: When binding values via perform(), add the self::PARAM_* type based on the value being bound.
    • TST: Update testing structure
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Aug 24, 2014)

    • NEW: Method Profiler::resetProfiles() allows you to clear existing profiles.
    • FIX: Correctly handles zero-indexed placeholder arrays on execute.
    • FIX: Passes all tests on HHVM.
    • REF: Added Scrutinizer-CI checks, along with code modifications to improve Scrutinizer score without changing functionality.
    • DOC: Updates to the README and various docblocks.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Apr 8, 2014)

    Release 2.0.1 includes a fix that moves PDO parameters explicitly back into the constructor. This restores named parameter matching for DI containers.

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Apr 1, 2014)

    First stable release of Aura.Sql 2.0.0

    Version 2 of Aura.Sql is greatly reduced from version 1, providing only an ExtendedPDO class, a query profiler, and a connection locator. No query objects, data mappers, or schema discovery objects are included; these are available in separate Aura.Sql_* packages. This keeps the package tightly focused as an extension for PDO, rather than a more general SQL toolset.

    This is a breaking change from the beta. Previously, the ExtendedPdo object itself would retain values to bind against the next query. After discussion with interested parties, notably Rasmus Schultz, I was convinced that it was too much of a departure from normal PDO semantics.

    Thus, the collection of values for binding has been removed. The methods query(), exec(), and prepare() no longer take bound values directly. Instead,we have a new method perform() that acts like query() but takes an array of values to bind at query time. We also have a new method prepareWithValues() that prepares a statement and binds values at that time. Finally, the new method fetchAffected() acts like exec(), but with bind values passed at the time of calling (just like with the other fetch*() methods).

    In addition, you can now pass an existing PDO connection to ExtendedPdo so decorate that existing PDO instance with the ExtendedPdo behaviors.

    Thanks to ralouphie, koriym, jblotus, and stof for their fixes and improvements in this release. Thanks also to Stan Lemon for the new proxy/decorator behavior, Rasmus Schultz for his semantic insights, and (as always) to Hari KT for his continued attention to detail.

    The full list of changes follows.

    • [BRK] Remove methods bindValue(), bindValues(), and getBindValues()
    • [BRK] query(), exec(), and prepare() no longer bind values; perform() and prepareWithValues() do
    • [FIX] setAttribute() needs to return a bool; thanks @mindplay-dk
    • [FIX] PDO::quote() now converts NULL to ''; this fix honors the normal PDO behavior.
    • [FIX] Method rollBack() now returns a boolean result
    • [ADD] Extract PdoInterface from ExtendedPdoInterface
    • [ADD] Add fetchObject*() to ExtendedPdoInterface
    • [ADD] Add methods perform() and prepareWithValues() to bind values as part of the call
    • [ADD] Add method fetchAffected() as an exec()-with-values replacement
    • [CHG] Constructor is now polymorphic; inject an existing PDO instance to be decorated, or pass PDO params
    • [ADD] Add method getPdo() to return the proxied/decorated instance
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-beta1(Jan 3, 2014)

    • Initial release of 2.0.0-beta1.

    Version 2 of Aura.Sql is greatly reduced from version 1, providing only an ExtendedPDO class, a query profiler, and a connection locator. No query objects, data mappers, or schema discovery objects are included; these are available in separate Aura.Sql_* packages. This keeps the package tightly focused as an extension for PDO, rather than a more general SQL toolset.

    Source code(tar.gz)
    Source code(zip)
Owner
Aura for PHP
High-quality, well-tested, standards-compliant, decoupled libraries that can be used in any codebase.
Aura for PHP
API abstracting communication with SQL providers (eg: MySQL) on top of PDO inspired by Java JDBC

SQL Data Access API Table of contents: About Configuration Execution Installation Unit Tests Examples Reference Guide About This API is a ultra light

Lucian Gabriel Popescu 0 Jan 9, 2022
Just another PDO database library

PDO Just another PDO database library Installation Use Composer $ composer require faapz/pdo Usage Examples selecting, inserting, updating and deletin

Fabian de Laender 313 Oct 11, 2022
ATK Data - Data Access Framework for high-latency databases (Cloud SQL/NoSQL).

ATK Data - Data Model Abstraction for Agile Toolkit Agile Toolkit is a Low Code framework written in PHP. Agile UI implement server side rendering eng

Agile Toolkit 257 Dec 29, 2022
Connect and work with MySQL/MariaDB database through MySQLi in PHP. This is an introductory project, If you need a simple and straightforward example that takes you straight to the point, you can check out these examples.

First MySQLi PHP Connect and work with MySQL/MariaDB database through MySQLi in PHP. The above exercises are designed for students. This is an introdu

Max Base 4 Feb 22, 2022
The Enobrev\ORM library is a small framework of classes meant to be used for simply mapping a mysql database to PHP classes, and for creating simply SQL statements using those classes.

The Enobrev\ORM library is a small framework of classes meant to be used for simply mapping a mysql database to PHP classes, and for creating simply SQL statements using those classes.

Mark Armendariz 0 Jan 7, 2022
Easy-to-use PDO wrapper for PHP projects.

EasyDB - Simple Database Abstraction Layer PDO lacks brevity and simplicity; EasyDB makes separating data from instructions easy (and aesthetically pl

Paragon Initiative Enterprises 705 Dec 9, 2022
You can sync any number of PDO supported databases

Features: Can backup any number of databases. No need to introduce column name only table name The Last id based data backup Support 12 different data

Tharusha Kavishan Udumulla 4 Aug 27, 2021
Very easy to use PDO MYSQL API. Just Include in PHP file and get it working.

CRUD-MYSQL-API Very easy to use PDO MYSQL API. Just Include in PHP file and get it working. INSTALATION Step 1: git clone https://github.com/arhex-lab

Abdul Raheem 4 Jun 14, 2022
Simple MySQL library for PHP 5.4+ includes Query Builder, PDO Native functions, Helper functions for quick use.

Simple MySQL library for PHP 5.4+ includes Query Builder, PDO Native functions, Helper functions for quick use.

Kodols 9 Dec 22, 2022
A simple library to access and manipulate database records. Built on top of Dibi and hardwired for PostgreSQL.

grifart/tables A simple library to access and manipulate database records. Built on top of Dibi and hardwired for PostgreSQL. This library is develope

GRIFART 5 Nov 11, 2022
Independent query builders for MySQL, PostgreSQL, SQLite, and Microsoft SQL Server.

Aura.SqlQuery Provides query builders for MySQL, Postgres, SQLite, and Microsoft SQL Server. These builders are independent of any particular database

Aura for PHP 424 Dec 12, 2022
A validating SQL lexer and parser with a focus on MySQL dialect.

SQL Parser A validating SQL lexer and parser with a focus on MySQL dialect. Code status Installation Please use Composer to install: composer require

phpMyAdmin 368 Dec 27, 2022
A SQL query builder with zero dependencies

Latitude Query Builder A SQL query builder with zero dependencies. Attempts to be PSR-1, PSR-2, and PSR-4 compliant. Install composer require latitude

Woody Gilk 618 Dec 30, 2022
A php securised login system, using Hash, Salt and prevent from SQL Injections

A Basic Secure Login Implementation Hashed & Salted password ( only hashed in ShA-512 for now ) No SQL injection possible Prevent XSS attacks from the

Yohann Boniface 1 Mar 6, 2022
SQL to Laravel Query Builder

Marwan - SQL To Laravel Builder SQL to Laravel Query Builder, A Converter written in PHP Features Converts SQL Queries to Laravel Query Builder. Assis

Rexhep Shijaku 162 Dec 19, 2022
Extract SQL statements from migrations

This is my package MigrationToSql To install: composer require bcleverly/migrationtosql --dev This repo is here to help you extract the SQL queries fr

Ben 4 Apr 15, 2022
A minimalistic implementation of asynchronous SQL for PHP.

libSQL A minimalistic implementation of asynchronous SQL for PHP. Installation via DEVirion Install the DEVirion plugin and start your server. This wi

null 10 Dec 7, 2022
Staggered import of large and very large MySQL Dumps even through the web servers with hard runtime limit and those in safe mode.

Staggered import of large and very large MySQL Dumps (like phpMyAdmin dumps) even through the web servers with hard runtime limit and those in safe mode. | Persian Translation Version

Amir Shokri 5 Jan 8, 2022
A Laravel package to output a specific sql to your favourite debugging tool. The supported log output is Laravel Telescope, Laravel Log, Ray, Clockwork, Laravel Debugbar and your browser.

Laravel showsql A Laravel package to output a specific sql to your favourite debugging tool, your browser or your log file. Use case You often want to

Dieter Coopman 196 Dec 28, 2022