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. [Database &amp; ORM](/categories/database)
4. /
5. dnocode/yii2-awsddb

ActiveYii2-extension[Database &amp; ORM](/categories/database)

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

Amazon dynamo db ActiveRecord for the Yii framework

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

Since Dec 30Pushed 10y 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 yesterday

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

28

—

LowBetter than 52% of packages

Maintenance13

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

4194d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4971950?v=4)[dino ](/maintainers/dnocode)[@dnocode](https://github.com/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

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[nhkey/yii2-activerecord-history

Storage history of changes to ActiveRecord

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

Pessimistic locking behavior for Yii2 ActiveRecord

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

Extends Yii ActiveRecord for Maria Dynamic Columns

577.0k](/packages/spinitron-yii2-dynamic-ar)[jlorente/yii2-activerecord-inheritance

ActiveRecord Inheritance is an util to provide the Class Table Inheritance Pattern the to the Yii2 framework. It fakes inheritance between two ActiveRecord classes.

184.2k](/packages/jlorente-yii2-activerecord-inheritance)[execut/yii2-1c-odata

Yii2 component for work with 1C oData via activeRecord

101.5k](/packages/execut-yii2-1c-odata)

PHPackages © 2026

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