Spanner/src/TransactionalReadTrait.php
private function checkReadContext()
    {
        if ($this->type === self::TYPE_SINGLE_USE && $this->context === SessionPoolInterface::CONTEXT_READWRITE) {
            throw new \BadMethodCallException('Cannot use a single-use read-write transaction for read or execute.');
        }
    }
private function checkReadContext()
    {
        if ($this->type === self::TYPE_SINGLE_USE && $this->context === SessionPoolInterface::CONTEXT_READWRITE) {
            throw new \BadMethodCallException('Cannot use a single-use read-write transaction for read or execute.');
        }
    }
private function checkReadContext ( ) { if ( $ this -> type === self :: TYPE_SINGLE_USE && $ this -> context === SessionPoolInterface :: CONTEXT_READWRITE ) { throw new \ BadMethodCallException ( 'Cannot use a single-use read-write transaction for read or execute.' ) ; } }
Check whether the context is valid for a read operation. Reads are not
allowed in single-use read-write transactions.

@throws \BadMethodCallException
Check whether the context is valid for a read operation . Reads are not allowed in single - use read - write transactions .