Spanner/src/Operation.php
public function read(Session $session, $table, KeySet $keySet, array $columns, array $options = [])
    {
        $options += [
            'index' => null,
            'limit' => null,
            'offset' => null,
            'transactionContext' => null
        ];

        $context = $this->pluck('transactionContext', $options);

        $call = function ($resumeToken = null) use ($table, $session, $columns, $keySet, $options) {
            if ($resumeToken) {
                $options['resumeToken'] = $resumeToken;
            }

            return $this->connection->streamingRead([
                'table' => $table,
                'session' => $session->name(),
                'columns' => $columns,
                'keySet' => $this->flattenKeySet($keySet),
                'database' => $session->info()['database']
            ] + $options);
        };

        return new Result($this, $session, $call, $context, $this->mapper);
    }
public function read(Session $session, $table, KeySet $keySet, array $columns, array $options = [])
    {
        $options += [
            'index' => null,
            'limit' => null,
            'offset' => null,
            'transactionContext' => null
        ];

        $context = $this->pluck('transactionContext', $options);

        $call = function ($resumeToken = null) use ($table, $session, $columns, $keySet, $options) {
            if ($resumeToken) {
                $options['resumeToken'] = $resumeToken;
            }

            return $this->connection->streamingRead([
                'table' => $table,
                'session' => $session->name(),
                'columns' => $columns,
                'keySet' => $this->flattenKeySet($keySet),
                'database' => $session->info()['database']
            ] + $options);
        };

        return new Result($this, $session, $call, $context, $this->mapper);
    }
public function read ( Session $ session , $ table , KeySet $ keySet , array $ columns , array $ options = [ ] ) { $ options += [ 'index' => null , 'limit' => null , 'offset' => null , 'transactionContext' => null ] ; $ context = $ this -> pluck ( 'transactionContext' , $ options ) ; $ call = function ( $ resumeToken = null ) use ( $ table , $ session , $ columns , $ keySet , $ options ) { if ( $ resumeToken ) { $ options [ 'resumeToken' ] = $ resumeToken ; } return $ this -> connection -> streamingRead ( [ 'table' => $ table , 'session' => $ session -> name ( ) , 'columns' => $ columns , 'keySet' => $ this -> flattenKeySet ( $ keySet ) , 'database' => $ session -> info ( ) [ 'database' ] ] + $ options ) ; } ; return new Result ( $ this , $ session , $ call , $ context , $ this -> mapper ) ; }
Lookup rows in a database.

@param Session $session The session in which to read data.
@param string $table The table name.
@param KeySet $keySet The KeySet to select rows.
@param array $columns A list of column names to return.
@param array $options [optional] {
Configuration Options.

@type string $index The name of an index on the table.
@type int $offset The number of rows to offset results by.
@type int $limit The number of results to return.
}
@return Result
Lookup rows in a database .