PHP code example of shailesh-matariya / laravel-spanner
1. Go to this page and download the library: Download shailesh-matariya/laravel-spanner library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shailesh-matariya / laravel-spanner example snippets
// There are four types of timestamp bounds: ExactStaleness, MaxStaleness, MinReadTimestamp and ReadTimestamp.
$timestampBound = new ExactStaleness(10);
// by Connection
$connection->selectWithTimestampBound('SELECT ...', $bindings, $timestampBound);
// by Query Builder
$queryBuilder
->withStaleness($timestampBound)
->get();
// by Connection
$connection->runPartitionedDml('UPDATE ...');
// by Query Builder
$queryBuilder->partitionedUpdate($values);
$queryBuilder->partitionedDelete($values);