2017 © Pedro Peláez
 

library sql

Simple SQL abstraction layer adapter to handle CRUD operations.

image

soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  • Sunday, July 23, 2017
  • by mkorkmaz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 124 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 22 Versions
  • 6 % Grown

The README.md

Soupmix

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Scrutinizer Code Quality Code Coverage, (*1)

Simple SQL abstraction layer adapter to handle CRUD operations written in PHP and built on top of Doctrine/DBAL. This library does not provide any ORM or ODM., (*2)

Installation

It's recommended that you use Composer to install Soupmix., (*3)

$ composer require soupmix/sql "~0.7"

This will install Soupmix and all required dependencies. Soupmix requires PHP 5.6.0 or newer., (*4)

Documentation

API Documentation: See details about the db adapters functions:, (*5)

Usage

// Connect to SQL Service


$config = [
    'dbname'    => 'test',
    'user'      => 'root',
    'password'  => '',
    'host'      => '127.0.0.1',
    'port'      => 3306,
    'charset'   => 'utf8',
    'driver'    => 'pdo_mysql',
];
$client = \Doctrine\DBAL\DriverManager::getConnection($config);
$sql = new \Soupmix\SQL(['db_name'=>$config['dbname']], $client);


$docs = [];
$docs[] = [
    "full_name" => "John Doe",
    "age" => 33,
    "email"    => "johndoe@domain.com"      
];
$docs[] = [
    "full_name" => "Jack Doe",
    "age" => 38,
    "email"    => "jackdoe@domain.com"
];

$docs[] = [
    "full_name" => "Jane Doe",
    "age" => 29,
    "email"    => "janedoe@domain.com"
];

foreach($docs as $doc){
    // insert user into database
    $sql_user_id = $sql->insert("users",$doc);
}
// get user data using id
$user_data = $sql->get('users', $sql_user_id);



// user's age lower_than_and_equal to 34 or greater_than_and_equal 36 but not 38
$filter = [[['age__lte'=>34],['age__gte'=>36]],"age__not"=>38];

//find users that has criteria encoded in $filter
$docs = $sql->find("users", $filter);


Contribute

  • Open issue if found bugs or sent pull request.
  • Feel free to ask if you have any questions.

The Versions

23/07 2017

dev-master

9999999-dev https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine mssql dbal mysql sqlite oracle abstraction layer adapters microsoft sql server

23/07 2017

0.8.1

0.8.1.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine mssql dbal mysql sqlite oracle abstraction layer adapters microsoft sql server

23/07 2017

0.8

0.8.0.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine mssql dbal mysql sqlite oracle abstraction layer adapters microsoft sql server

06/06 2017

0.7.13

0.7.13.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine mssql dbal mysql sqlite oracle abstraction layer adapters microsoft sql server

06/06 2017

0.7.12

0.7.12.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine mssql dbal mysql sqlite oracle abstraction layer adapters microsoft sql server

06/06 2017

0.7.11

0.7.11.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine mssql dbal mysql sqlite oracle abstraction layer adapters microsoft sql server

06/06 2017

0.7.10

0.7.10.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine mssql dbal mysql sqlite oracle abstraction layer adapters microsoft sql server

01/03 2017

0.7.9

0.7.9.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine mssql dbal mysql sqlite oracle abstraction layer adapters microsoft sql server

19/01 2017

0.7.8

0.7.8.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine mssql dbal mysql sqlite oracle abstraction layer adapters microsoft sql server

17/01 2017

0.7.7

0.7.7.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine mssql dbal mysql sqlite oracle abstraction layer adapters microsoft sql server

10/09 2016

0.7.6

0.7.6.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine dbal mysql sqlite oracle abstraction layer adapters microsoft sql server msql

31/08 2016

0.7.5

0.7.5.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine dbal mysql sqlite oracle abstraction layer adapters microsoft sql server msql

25/07 2016

0.7.4

0.7.4.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine dbal mysql sqlite oracle abstraction layer adapters microsoft sql server msql

13/07 2016

0.7.3

0.7.3.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine dbal mysql sqlite oracle abstraction layer adapters microsoft sql server msql

03/07 2016

0.7.2

0.7.2.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine dbal mysql sqlite oracle abstraction layer adapters microsoft sql server msql

30/06 2016

0.7.1

0.7.1.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine dbal mysql sqlite oracle abstraction layer adapters microsoft sql server msql

30/06 2016

0.7

0.7.0.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine dbal mysql sqlite oracle abstraction layer adapters microsoft sql server msql

28/06 2016

0.6

0.6.0.0 https://github.com/soupmix/sql

Simple SQL abstraction layer adapter to handle CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql doctrine dbal mysql sqlite oracle abstraction layer adapters microsoft sql server msql

27/06 2016

0.5.3

0.5.3.0 https://github.com/soupmix/mongodb

Simple PHP MongoDB adapter to handle low level CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql mysql sqlite oracle sql server adapters msql

27/06 2016

0.5.2

0.5.2.0 https://github.com/soupmix/mongodb

Simple PHP MongoDB adapter to handle low level CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql mysql sqlite oracle sql server adapters msql

27/06 2016

0.5.1

0.5.1.0 https://github.com/soupmix/mongodb

Simple PHP MongoDB adapter to handle low level CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql mysql sqlite oracle sql server adapters msql

23/06 2016

0.5

0.5.0.0 https://github.com/soupmix/mongodb

Simple PHP MongoDB adapter to handle low level CRUD operations.

  Sources   Download

MIT

The Requires

 

The Development Requires

database sql postgresql mysql sqlite oracle sql server adapters msql