2017 © Pedro Peláez
 

library simpledb

image

firehed/simpledb

  • Monday, February 19, 2018
  • by Firehed
  • Repository
  • 1 Watchers
  • 0 Stars
  • 299 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

SimpleDb

A very simple PDO wrapper, (*1)

Detailed documentation is coming Soon™., (*2)

API

Firehed\SimpleDb\SimpleDb

public function __construct(PDO $pdo)

Constructor, (*3)

public function select(string $query, array $params = []): Generator

Pass in any SELECT query, with colon-prefixed :placeholders. For each of those placeholders, ensure $params has a matching key, including the colon. The value can be any scalar type, or an array of scalar types which will automatically be expanded when matched with an IN() clause. Automatic IN support was the primary motivation behind this library., (*4)

public function selectOne(string $query, array $params = []): array

Same as above, but you get either the first row directly or a NoResultError will be thrown. Nice for primary/unique key SELECTs., (*5)

The Versions

19/02 2018

0.0.2

0.0.2.0

  Sources   Download

MIT

The Development Requires

by Eric Stern

17/02 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Development Requires

by Eric Stern

17/02 2018

0.0.1

0.0.1.0

  Sources   Download

MIT

The Development Requires

by Eric Stern