Download the PHP package adaiasmagdiel/pdo-restify without Composer

On this page you can find all versions of the php package adaiasmagdiel/pdo-restify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pdo-restify

pdo-restify

Tests Latest Version Total Downloads

A small, framework-agnostic REST API layer on top of PDO. It exposes whitelisted database tables as CRUD endpoints — inspired by PostgREST — but works with plain PDO, so it runs on MySQL, MariaDB and SQLite, and can be plugged into any PHP application: Slim, Laravel, CakePHP, Erlenmeyer, or a plain script.

Early, minimal first version. The scope is intentionally small — see Roadmap.

📚 Full documentation — guides for connections, resources & the security model, querying, framework integration, error handling, tips, and a complete API reference. The sections below are a quick overview; the docs go deeper on every one of them.

🟨 JS/TS client — a typed, dependency-free fetch-based client for consuming a pdo-restify API from JS/TS (browser, Node, or edge), published as @adaiasmagdiel/pdo-restify.

Install

Quick start

Api::handle() takes and returns plain data — it does no I/O by itself. Your app (or a thin bridge, see examples/erlenmeyer-bridge.php) is responsible for turning the real HTTP request into a Request and writing the resulting Response back out. This is what makes pdo-restify pluggable into any router or framework.

Security model

PostgreSQL has Row-Level Security to scope what each request can see or change. PDO has nothing like that built in, and pdo-restify doesn't try to fake it either — it gives you the pieces and leaves the decision to you:

See Resources & security model for the full guide, including a ready-made "public read, admin-only write" recipe plus multi-tenant and role-based policy examples.

Query string

Param Example Meaning
<column> age=gt.18 Filter, operator.value
select select=id,title Which whitelisted columns to return
order order=created_at.desc Sort column and direction
limit / offset limit=20&offset=40 Pagination, limit is capped server-side

Supported filter operators: eq, ne, gt, gte, lt, lte, like (* is the wildcard), in (comma-separated values). Full details, including how AND/pagination/limits interact, in Querying.

select= can also embed related rows — select=id,title,comments(id,body) — declared with ->hasMany()/->belongsTo() on a Resource, scoped by the related resource's own policy just like a direct request to it. See Relationships.

Routes

Api::handle() dispatches based on Request::$path and Request::$method:

Method Path Action
GET /{table} List rows (filters apply)
GET /{table}/{id} Fetch a single row
POST /{table} Insert a row, or bulk-insert if the body is a list of objects
PATCH /{table}/{id} Update a row
PATCH /{table} Bulk-update rows (each object must include the primary key)
DELETE /{table}/{id} Delete a row
DELETE /{table} Bulk-delete rows (body is a list of ids)

POST/PATCH/DELETE bulk requests run in a single transaction — one bad row rolls back the whole batch. See Bulk operations.

Testing

The suite runs on Pest against an in-memory SQLite database:

Coverage requires Xdebug or PCOV (composer test:coverage, enforced at 95%+ in CI). Locally, with Xdebug installed:

MySQL and MariaDB compatibility is checked separately, against real service containers, by the Integration workflow on GitHub Actions. Those tests skip themselves locally and only run in CI.

Roadmap

License

LGPL-3.0-or-later.


All versions of pdo-restify with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-pdo Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package adaiasmagdiel/pdo-restify contains the following files

Loading the files please wait ...