Download the PHP package giginc/cakephp3-driver-bigquery without Composer
On this page you can find all versions of the php package giginc/cakephp3-driver-bigquery. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download giginc/cakephp3-driver-bigquery
More information about giginc/cakephp3-driver-bigquery
Files in giginc/cakephp3-driver-bigquery
Package cakephp3-driver-bigquery
Short Description BigQuery direver for CakePHP 3.5
License MIT
Informations about the package cakephp3-driver-bigquery
BigQuery Driver for Cakephp3
An BigQuery for CakePHP 3.5,3.6,3.7
Installing via composer
Install composer and run:
Defining a connection
Now, you need to set the connection in your config/app.php file:
Models
After that, you need to load Giginc\BigQuery\ORM\Table in your tables class:
Table
Entity
php namespace App\Controller;
use App\Controller\AppController;
/**
- Pages Controller
- @property \App\Model\Table\PagesTable $Pages
-
@method \App\Model\Entity\Review[]|\Cake\Datasource\ResultSetInterface paginate($object = null, array $settings = []) */ class PagesController extends AppController { /**
- Index method
- @access public
-
@return \Cake\Http\Response|void / public function index() { $this->loadModel('Products'); // select $data = $this->Products->date('2021-04-12') ->find() ->fields([ 'name', 'description', 'MAX(count) AS max', 'COUNT() AS count', ]) ->where([ 'name' => 'iphone', 'count >' => 0, ]) ->group(['name']) ->order(['name' => 'DESC']) ->limit(5) ->all();
// insert $this->Products->insert([ 'name' => 'iPhoneXR', 'description' => 'iPhoneXR', 'created_at' => '2021-04-21', ]); } }