Spanner/src/Operation.php
private function beginTransaction(Session $session, array $options = [])
    {
        $options += [
            'transactionOptions' => []
        ];

        return $this->connection->beginTransaction($options + [
            'session' => $session->name(),
            'database' => $session->info()['database']
        ]);
    }
private function beginTransaction(Session $session, array $options = [])
    {
        $options += [
            'transactionOptions' => []
        ];

        return $this->connection->beginTransaction($options + [
            'session' => $session->name(),
            'database' => $session->info()['database']
        ]);
    }
private function beginTransaction ( Session $ session , array $ options = [ ] ) { $ options += [ 'transactionOptions' => [ ] ] ; return $ this -> connection -> beginTransaction ( $ options + [ 'session' => $ session -> name ( ) , 'database' => $ session -> info ( ) [ 'database' ] ] ) ; }
Execute a service call to begin a transaction or snapshot.

@see https://cloud.google.com/spanner/reference/rpc/google.spanner.v1#google.spanner.v1.BeginTransactionRequest BeginTransactionRequest

@param Session $session The session to start the snapshot in.
@param array $options [optional] Configuration options.
@return array
Execute a service call to begin a transaction or snapshot .