Skip to content

What is the difference between createReadWriteConnection and createSingleConnection? #4

Description

@dotnetCarpenter

I'm wondering, what is the minimum required fields in the configuration array? While searching the source code, I came across the read property. I couldn't find anything in the README, so I ask here.

What is the difference between createReadWriteConnection and createSingleConnection?

protected function makeConnection(array $config, $lazy)
{
    if (isset($config['read'])) {
        return $this->createReadWriteConnection($config, $lazy);
    }

    return $this->createSingleConnection($config, $lazy);
}

in ConnectionFactory.php

Just by reading the names. I'm guessing that it's better to leave out read if I only need to make read queries.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions