src/apis/ProxyController.php
public function actionDataProvider($machine, $buildToken, $table, $offset)
    {
        $build = $this->ensureBuild($machine, $buildToken);
        
        $config = $build->getTableConfig($table);
        
        $offsetNummeric = $offset * $build->rowsPerRequest;

        $query =  (new Query())
            ->select($config['fields'])
            ->from($config['name'])
            ->offset($offsetNummeric)
            ->limit($build->rowsPerRequest);
        
        if (!empty($config['pks']) && is_array($config['pks'])) {
            $orders = [];
            foreach ($config['pks'] as $pk) {
                $orders[$pk] = SORT_ASC;
            }
            $query->orderBy($orders);
        }
        
        return $query->all();
    }
public function actionDataProvider($machine, $buildToken, $table, $offset)
    {
        $build = $this->ensureBuild($machine, $buildToken);
        
        $config = $build->getTableConfig($table);
        
        $offsetNummeric = $offset * $build->rowsPerRequest;

        $query =  (new Query())
            ->select($config['fields'])
            ->from($config['name'])
            ->offset($offsetNummeric)
            ->limit($build->rowsPerRequest);
        
        if (!empty($config['pks']) && is_array($config['pks'])) {
            $orders = [];
            foreach ($config['pks'] as $pk) {
                $orders[$pk] = SORT_ASC;
            }
            $query->orderBy($orders);
        }
        
        return $query->all();
    }
public function actionDataProvider ( $ machine , $ buildToken , $ table , $ offset ) { $ build = $ this -> ensureBuild ( $ machine , $ buildToken ) ; $ config = $ build -> getTableConfig ( $ table ) ; $ offsetNummeric = $ offset * $ build -> rowsPerRequest ; $ query = ( new Query ( ) ) -> select ( $ config [ 'fields' ] ) -> from ( $ config [ 'name' ] ) -> offset ( $ offsetNummeric ) -> limit ( $ build -> rowsPerRequest ) ; if ( ! empty ( $ config [ 'pks' ] ) && is_array ( $ config [ 'pks' ] ) ) { $ orders = [ ] ; foreach ( $ config [ 'pks' ] as $ pk ) { $ orders [ $ pk ] = SORT_ASC ; } $ query -> orderBy ( $ orders ) ; } return $ query -> all ( ) ; }
Return sql table data.

@param string $machine
@param string $buildToken
@param string $table
@param integer $offset
@return array
Return sql table data .