[PR #49] [MERGED] Implementation for Amazon DynamoDB #75

Closed
opened 2026-01-23 11:35:07 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/KeyValueStore/pull/49
Author: @nicktacular
Created: 10/22/2015
Status: Merged
Merged: 7/5/2016
Merged by: @EmanueleMinotto

Base: masterHead: dynamodb


📝 Commits (10+)

  • 518f421 Implementation for Amazon DynamoDB
  • ef42557 Whitespace; useless comment
  • 84d5db7 Cleaner options; php 5.4 compat
  • 902da8f Moved AWS to require-dev
  • 58f98f8 Removed unnecessary not empty check
  • f61ce21 Members downgraded to private
  • 79bee99 Exception refactoring
  • cc3e478 Accessor level refactors
  • 7877050 Comment cleanups
  • e0878ca Converted keys to consts

📊 Changes

6 files changed (+656 additions, -3 deletions)

View changed files

📝 README.md (+1 -1)
📝 composer.json (+3 -2)
lib/Doctrine/KeyValueStore/InvalidArgumentException.php (+48 -0)
📝 lib/Doctrine/KeyValueStore/NotFoundException.php (+4 -0)
lib/Doctrine/KeyValueStore/Storage/AmazonDynamoDbStorage.php (+294 -0)
tests/Doctrine/Tests/KeyValueStore/Storage/AmazonDynamoDbTest.php (+306 -0)

📄 Description

Added an implementation for Amazon DynamoDB. Using the $options key to the constructor, you can set which $storageName uses which key name for access. For example, if your key-val store called Awesome uses a key called MyKey then you can set it like so:

$credentials = new \Aws\Credentials\Credentials('yo', 'sup');

$aws = new \Aws\Sdk([
    'timeout' => 1,
    'credentials' => $credentials,
    'region' => 'us-west-2',
    'version' => 'latest',
    'endpoint' => 'http://127.0.0.1:11888',
]);

$storage = new AmazonDynamoDbStorage(
    $aws->createDynamoDb(),
    null,
    ['storage_keys' => ['Awesome' => 'MyKey']]
);

Otherwise, the option default_key_name which defaults to Id will be used as the key name.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/KeyValueStore/pull/49 **Author:** [@nicktacular](https://github.com/nicktacular) **Created:** 10/22/2015 **Status:** ✅ Merged **Merged:** 7/5/2016 **Merged by:** [@EmanueleMinotto](https://github.com/EmanueleMinotto) **Base:** `master` ← **Head:** `dynamodb` --- ### 📝 Commits (10+) - [`518f421`](https://github.com/doctrine/KeyValueStore/commit/518f4211b019589351e43ddac781796976c8f393) Implementation for Amazon DynamoDB - [`ef42557`](https://github.com/doctrine/KeyValueStore/commit/ef425578fbdbfc2528054a9dcc4722743bec4e73) Whitespace; useless comment - [`84d5db7`](https://github.com/doctrine/KeyValueStore/commit/84d5db70730a283cbb0cc623df4db3076899dafd) Cleaner options; php 5.4 compat - [`902da8f`](https://github.com/doctrine/KeyValueStore/commit/902da8f693e3fcbd4c720be3ff80712d6f58a021) Moved AWS to require-dev - [`58f98f8`](https://github.com/doctrine/KeyValueStore/commit/58f98f8a94e17121412f530b8423362f89d51613) Removed unnecessary not empty check - [`f61ce21`](https://github.com/doctrine/KeyValueStore/commit/f61ce21d4b368a682960a7aecc1b13d5e88cb7ee) Members downgraded to private - [`79bee99`](https://github.com/doctrine/KeyValueStore/commit/79bee991a2bd941b290c051710466e099746968a) Exception refactoring - [`cc3e478`](https://github.com/doctrine/KeyValueStore/commit/cc3e478d1063d34f4f6c1f2db4baaecd27537103) Accessor level refactors - [`7877050`](https://github.com/doctrine/KeyValueStore/commit/7877050062bcf870a0ee7a92dc99c472156f2749) Comment cleanups - [`e0878ca`](https://github.com/doctrine/KeyValueStore/commit/e0878ca97ac2e298c30de7370fed70f7baba7aa2) Converted keys to consts ### 📊 Changes **6 files changed** (+656 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `composer.json` (+3 -2) ➕ `lib/Doctrine/KeyValueStore/InvalidArgumentException.php` (+48 -0) 📝 `lib/Doctrine/KeyValueStore/NotFoundException.php` (+4 -0) ➕ `lib/Doctrine/KeyValueStore/Storage/AmazonDynamoDbStorage.php` (+294 -0) ➕ `tests/Doctrine/Tests/KeyValueStore/Storage/AmazonDynamoDbTest.php` (+306 -0) </details> ### 📄 Description Added an implementation for Amazon DynamoDB. Using the `$options` key to the constructor, you can set which `$storageName` uses which key name for access. For example, if your key-val store called `Awesome` uses a key called `MyKey` then you can set it like so: ``` php $credentials = new \Aws\Credentials\Credentials('yo', 'sup'); $aws = new \Aws\Sdk([ 'timeout' => 1, 'credentials' => $credentials, 'region' => 'us-west-2', 'version' => 'latest', 'endpoint' => 'http://127.0.0.1:11888', ]); $storage = new AmazonDynamoDbStorage( $aws->createDynamoDb(), null, ['storage_keys' => ['Awesome' => 'MyKey']] ); ``` Otherwise, the option `default_key_name` which defaults to `Id` will be used as the key name. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-23 11:35:07 +01:00
admin closed this issue 2026-01-23 11:35:07 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/KeyValueStore#75