Download the PHP package kenxudk/yii2-dynamodb without Composer

On this page you can find all versions of the php package kenxudk/yii2-dynamodb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-dynamodb

996.icu

yii2-dynamodb

A aws dynamodb insert, delete, update, select package (一个简单的aws dynamodb 链路操作封装类)

composer

description

Because I used the YII2 framework, the log is yii, and the AWS package is placed under the vender. The configuration file for this class is in params.php. as follows:

因为我用的时YII2框架,所以日志用的是yii的,并且AWS包放在vender下面,这个类的配置文件在params.php里面,如下:

   'aws'=>[
        'region'=>'ap-southeast-1',
        'version'=>'',
        'key'=>"",
        'secret'=>"",
    ],

simple use

TABLE_NAME is the name of the table you are using, TABLE_INDEX is currently using the index name (说明TABLE_NAME是你使用表名,TABLE_INDEX当前使用的索引名称)

add

$result = Dynamodb::table(TABLE_NAME)->insert($data);

update

$expressValue = $updata = $expressName = [];
$i = 0;
foreach ($up_arr as $key => $value) {
    $f = '#f'.$i;
    $v = ':v'.$i;
    $expressName[$f] = $key;
    $updata[] = [$f,$v];
    $expressValue[$v] = $value;
    $i++;
}
 $result = KmDynamodb::table(TABLE_NAME)->expressValue($expressValue)->kWhere(['pk_id'=>$primary_key])->expressName($expressName)->update($updata);

select

Get multiples with the primary key (batchGetItem)

    $keys = [];
    foreach ($primary_keys as $primary_key) {
        $keys[] = ['kid' => $primary_key];
    }
    $feeds = Dynamodb::table(TABLE_NAME)->kWhere($keys)->order(true)->ones(); 

Get one with the primary key (getItem)

   Dynamodb::table(TABLE_NAME)->kWhere(['kid'=>$primary_key])->one();

query

 Dynamodb::table(TABLE_NAME,TABLE_INDEX)->kWhere('kid=:v')
 ->expressValue([':v'=>$primary_key])->limit(10,[])->query();    

delete

Dynamodb::table(TABLE_NAME)->kWhere(['kid'=>$primary_key])->delete();  

All versions of yii2-dynamodb with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
aws/aws-sdk-php Version ^3.238
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kenxudk/yii2-dynamodb contains the following files

Loading the files please wait ....