PHP Classes

File: Config/Queries/ClientDB/Common/Address.php

Recommend this page to a friend!
  Classes of Ramesh Narayan Jangid   Open Swoole Microservices   Config/Queries/ClientDB/Common/Address.php   Download  
File: Config/Queries/ClientDB/Common/Address.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: Open Swoole Microservices
Implement microservices using Open Swoole
Author: By
Last change: Implemented serverMode feature for Read Configs
Date: 13 days ago
Size: 694 bytes
 

Contents

Class file image Download
<?php
namespace Microservices\Config\Queries\ClientDB\Common;

use
Microservices\App\Constants;

return [
   
'query' => "UPDATE `address` SET __SET__ WHERE __WHERE__",
   
'__CONFIG__' => [// [{payload/uriParams}, key/index, {Constants::$REQUIRED}]
       
['uriParams', 'id', Constants::$REQUIRED],
    ],
   
'__WHERE__' => [
       
'is_deleted' => ['custom', 'No'],
       
'id' => ['uriParams', 'id']
    ],
   
'validate' => [
        [
           
'fn' => 'primaryKeyExist',
           
'fnArgs' => [
               
'table' => ['custom', 'address'],
               
'primary' => ['custom', 'id'],
               
'id' => ['uriParams', 'id']
            ],
           
'errorMessage' => 'Invalid address id'
       
],
    ]
];