PHP Classes

File: public_html/Config/Queries/Auth/ClientDB/Groups/AdminGroup/POST/Category.php

Recommend this page to a friend!
  Classes of Ramesh Narayan Jangid (Sharma)   PHP Microservices Framework   public_html/Config/Queries/Auth/ClientDB/Groups/AdminGroup/POST/Category.php   Download  
File: public_html/Config/Queries/Auth/ClientDB/Groups/AdminGroup/POST/Category.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: PHP Microservices Framework
Setup microservices apps with configuration arrays
Author: By
Last change: Refactoring
Date: 3 months ago
Size: 2,322 bytes
 

Contents

Class file image Download
<?php

/**
 * API Query config
 * php version 8.3
 *
 * @category API_Query_Config
 * @package Microservices
 * @author Ramesh N Jangid <[email protected]>
 * @copyright 2025 Ramesh N Jangid
 * @license MIT https://opensource.org/license/mit
 * @link https://github.com/polygoncoin/Microservices
 * @since Class available since Release 1.0.0
 */

namespace Microservices\public_html\Config\Queries\Auth\ClientDB\Groups\AdminGroup\POST;

use
Microservices\App\DatabaseCacheKey;

return [
   
'__QUERY__' => 'INSERT INTO `category` SET __SET__',
   
'__SET__' => [
        [
           
'column' => 'name',
           
'fetchFrom' => 'payload',
           
'fetchFromValue' => 'name'
       
],
        [
           
'column' => 'parent_id',
           
'fetchFrom' => 'custom',
           
'fetchFromValue' => 0
       
],
    ],
   
'__INSERT-IDs__' => 'category:id',
   
'__SUB-QUERY__' => [
       
'sub' => [
           
'__QUERY__' => 'INSERT INTO `category` SET __SET__',
           
'__SET__' => [
                [
                   
'column' => 'name',
                   
'fetchFrom' => 'payload',
                   
'fetchFromValue' => 'subname'
               
],
                [
                   
'column' => 'parent_id',
                   
'fetchFrom' => '__INSERT-IDs__',
                   
'fetchFromValue' => 'category:id'
               
],
            ],
           
'__INSERT-IDs__' => 'sub:id',
           
'__SUB-QUERY__' => [
               
'subsub' => [
                   
'__QUERY__' => 'INSERT INTO `category` SET __SET__',
                   
'__SET__' => [
                        [
                           
'column' => 'name',
                           
'fetchFrom' => 'payload',
                           
'fetchFromValue' => 'subsubname'
                       
],
                        [
                           
'column' => 'parent_id',
                           
'fetchFrom' => '__INSERT-IDs__',
                           
'fetchFromValue' => 'sub:id'
                       
],
                    ],
                   
'__INSERT-IDs__' => 'subsub:id',
                ]
            ]
        ]
    ],
   
'useHierarchy' => true,
   
'affectedCacheKeys' => [
       
DatabaseCacheKey::$Category,
       
DatabaseCacheKey::$Category1
   
]
];