private function transactionSelector(array &$options, array $previous = [])
    {
        $options += [
            'begin' => false,
            'transactionType' => SessionPoolInterface::CONTEXT_READ,
        ];

        $res = $this->transactionOptions($options, $previous);

        // TransactionSelector uses a different key name for singleUseTransaction
        // and transactionId than transactionOptions, so we'll rewrite those here
        // so transactionOptions works as expected for commitRequest.

        $type = $res[1];
        if ($type === 'singleUseTransaction') {
            $type = 'singleUse';
        } elseif ($type === 'transactionId') {
            $type = 'id';
        }

        return [
            [$type => $res[0]],
            $res[2]
        ];
    }