PHPackages                             dnocode/yii2-awsddb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. dnocode/yii2-awsddb

ActiveYii2-extension

dnocode/yii2-awsddb
===================

Amazon dynamo db ActiveRecord for the Yii framework

v1.0.2(11y ago)31103[2 PRs](https://github.com/dnocode/dnocode-yii2-awsddb/pulls)BSD-3-ClausePHP

Since Dec 30Pushed 9y ago3 watchersCompare

[ Source](https://github.com/dnocode/dnocode-yii2-awsddb)[ Packagist](https://packagist.org/packages/dnocode/yii2-awsddb)[ RSS](/packages/dnocode-yii2-awsddb/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Amazon Dynamodb activeRecord Yii 2
==================================

[](#amazon-dynamodb-activerecord-yii-2)

This extension provides activeRecord support for amazon dynamo db

return \[ //.... 'components' =&gt; \[ ddb' =&gt; \[ "class"=&gt;'dnocode\\awsddb\\ar\\Connection', 'base\_url'=&gt;"http://localhost:8000 \[OPTIONAL ONLY FOR DYNAMO LOCAL\]", 'key' =&gt; 'AMAZONKEY', 'secret' =&gt; 'AMAZONSECRET', 'region' =&gt; 'eu-west-1' \], \] \];

Installation
============

[](#installation)

Add to composer dependencies

"dnocode/yii2-awsddb": "\*"

USING
=====

[](#using)

How to define a model

```
class Element {

   public $name;
   public $surname;
   public $sex;
   public $uid;

    /**hash and range**/
    public static function primaryKey(){ return ["uid"];}

    public function rules(){    return [[['uid'], 'required']];}
}

```

\#put

```
$e=new Element();
$e->name
$e->name="nerd";
$e->surname="iam";
$e->sex="no_nerd_i_said";
$e->uid="ciao";
$e->save();

```

\#find and update

```
 $element=Element::find()->where(["uid"=>"ciao"])  ->one();
 $element->surname="update";
 $consumer->save();

```

\#delete and update

```
 $element=Element::find()->where(["uid"=>"ciao"])  ->one();
 $element->delete();
 Element::deleteAll(["uid"=>"ciao"]);

```

find with where
===============

[](#find-with-where)

```
  $element=Element::find()->
          where(["surname"=>"iam"])
          ->one();

```

Find object with the hash key
-----------------------------

[](#find-object-with-the-hash-key)

```
the active record will use
 get operation 4  performance*/

```
$element=Element::find()->
        andWhere("uid")
        ->eq("ciao")
        ->all();*/
 ```

```

Execute find on attribute that isn`t primary key
------------------------------------------------

[](#execute-find-on-attribute--that-isnt-primary-key)

```
    will be execute a scan operation with filter on that attribute

```
$element=Element::find()->
        andwhere("surname")->eq("prova")
        ->all();
```

```

Compare attribute with more than one value
------------------------------------------

[](#compare---attribute-with-more-than-one-value)

```
```
 $element=Element::orWhere("name")->in(["name1","name2"])
 ->all();
```

```

\#TODO

1. batch operations with transaction
2. support for relation
3. iterator for query with more than 1MB

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

2

Last Release

4139d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4679c88300ea02e8cc58e56e571bced4baa423a1896ba6246428c11ce4362235?d=identicon)[dnocode](/maintainers/dnocode)

---

Top Contributors

[![dnocode](https://avatars.githubusercontent.com/u/4971950?v=4)](https://github.com/dnocode "dnocode (25 commits)")

---

Tags

amazonyii2activerecorddynamo-db

### Embed Badge

![Health badge](/badges/dnocode-yii2-awsddb/health.svg)

```
[![Health](https://phpackages.com/badges/dnocode-yii2-awsddb/health.svg)](https://phpackages.com/packages/dnocode-yii2-awsddb)
```

###  Alternatives

[fedemotta/yii2-aws-sdk

This extension provides the AWS SDK integration for the Yii2 framework

15430.4k2](/packages/fedemotta-yii2-aws-sdk)[nhkey/yii2-activerecord-history

Storage history of changes to ActiveRecord

46143.4k1](/packages/nhkey-yii2-activerecord-history)[yii-dream-team/yii2-lockable-activerecord

Pessimistic locking behavior for Yii2 ActiveRecord

1886.5k](/packages/yii-dream-team-yii2-lockable-activerecord)[spinitron/yii2-dynamic-ar

Extends Yii ActiveRecord for Maria Dynamic Columns

576.8k](/packages/spinitron-yii2-dynamic-ar)[mdmsoft/yii2-ar-behaviors

Behaviors for Yii2

2024.6k1](/packages/mdmsoft-yii2-ar-behaviors)[apexwire/yii2-restclient

Tools to use API as ActiveRecord for Yii2

143.5k](/packages/apexwire-yii2-restclient)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
