Download the PHP package byjg/anydataset-nosql without Composer
On this page you can find all versions of the php package byjg/anydataset-nosql. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download byjg/anydataset-nosql
More information about byjg/anydataset-nosql
Files in byjg/anydataset-nosql
Package anydataset-nosql
Short Description Anydataset NoSQL standardizes the access to non-relational databases/repositories and provides a consistent interface for both NoSQL document databases and Key/Value stores.
License MIT
Informations about the package anydataset-nosql
sidebar_key: anydataset-nosql sidebar_category: data-access tags: [php, anydataset, databases]
NoSQL Database Abstraction
One interface for document databases and one for key/value stores, whatever the service behind them. The implementation supports:
- MongoDB (document-based)
- AWS DynamoDB (key/value)
- S3-Like Storage (key/value)
- Cloudflare KV (key/value)
Anydataset is an agnostic data source abstraction layer in PHP. See more about Anydataset here.
Why
MongoDB, DynamoDB, S3 and Cloudflare KV each come with their own SDK and their own way to read, write and list. Storing a file in S3 today and in Cloudflare KV tomorrow means rewriting every call.
Anydataset NoSQL defines two contracts, NoSqlInterface for documents and
KeyValueInterface for key/value stores, and picks the service from the connection URI:
- Change the service with the URI, not the code that uses it.
- Same iterator as the rest of AnyDataset.
getIterator()returns the same rows as a database or a file, and document queries use the sameIteratorFilter.
Features
- Access both document-based and key/value repositories with consistent interfaces
- NoSQL document-based databases accessed through
NoSqlInterface - Key/Value stores accessed through
KeyValueInterface - Unified connection string format based on URIs
- Type-safe DynamoDB attribute definitions using enums
Connection Based on URI
The connection string for databases is based on URL.
See below the current implemented drivers:
| Datasource | Connection String |
|---|---|
| MongoDB | mongodb://username:password@hostname:port/database |
| S3 | s3://accesskey:secretkey@region/bucket?params |
| Cloudflare KV | kv://username:password@accountid/namespaceid |
| AWS DynamoDB | dynamodb://accesskey:secretkey@hostname/tablename?params |
Documentation
NoSQL Drivers
- MongoDB - Document-based NoSQL database
Key/Value Drivers
- AWS DynamoDB - Key/Value store with type-safe attribute definitions
- AWS S3 - Object storage as Key/Value store
- Cloudflare KV - Cloudflare Workers KV storage
Additional Features
- Running Tests - How to run the test suite
Installation
Just type:
Running Tests
More details are in Running Tests.
All versions of anydataset-nosql with dependencies
ext-curl Version *
aws/aws-sdk-php Version 3.*
byjg/cache-engine Version ^6.0
byjg/anydataset Version ^6.0
byjg/serializer Version ^6.0
byjg/webrequest Version ^6.0
ext-json Version *