Download the PHP package quankim/dynamodb without Composer
On this page you can find all versions of the php package quankim/dynamodb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package dynamodb
laravel-dynamodb
Fork from [https://github.com/baopham/laravel-dynamodb]()
Supports all key types - primary hash key and composite keys.
For advanced users only. If you're not familiar with Laravel, Laravel Eloquent and DynamoDB, then I suggest that you get familiar with those first.
Breaking Changes for v0.4
- If you're using v0.3 and below, please see here
- To upgrade to v0.4, please see the migration note
- Install
- Usage
- Indexes
- Composite Keys
- Test
- Requirements
- Todo
- License
- Author and Contributors
Install
-
Composer install
-
Install service provider:
- Put DynamoDb config in
config/aws.php
:
Usage
- Extends your model with
BaoPham\DynamoDb\DynamoDbModel
, then you can use Eloquent methods that are supported. The idea here is that you can switch back to Eloquent without changing your queries.
Supported methods:
- Or if you want to sync your DB table with a DynamoDb table, use trait
BaoPham\DynamoDb\ModelTrait
, it will call aPutItem
after the model is saved.
Indexes
If your table has indexes, make sure to declare them in your model class like so
Note that order of index matters when a key exists in multiple indexes.
For example, we have this
with
will use count_index
.
will use user_index
.
Composite Keys
To use composite keys with your model:
-
Set
$compositeKey
to an array of the attributes names comprising the key, e.g. - To find a record with a composite key
Test
Run:
-
DynamoDb local version: 2016-01-07_1.0
- DynamoDb local schema for tests created by the DynamoDb local shell is located here
Requirements
Laravel ^5.1
TODO
- [ ] Upgrade a few legacy attributes:
AttributesToGet
,ScanFilter
, ...
License
MIT
Author and Contributors
All versions of dynamodb with dependencies
illuminate/support Version ~5.1
illuminate/database Version ~5.1