Add $cached param to BaseConnection::tableExists() - #6364
Merged
Conversation
kenjis
reviewed
Aug 9, 2022
kenjis
reviewed
Aug 9, 2022
Member
Author
|
Any idea what is wrong with Mock? public function query(string $sql, $binds = null, bool $setEscapeFlags = true, string $queryClass = '')
{
$queryClass = str_replace('Connection', 'Query', static::class);
$query = new $queryClass($this); |
kenjis
reviewed
Aug 10, 2022
Member
Because it uses PHPUnit mock. Don't worry. The test is no longer of much use. |
Member
Author
|
I'll remove it and create a live test |
Member
No, you can't. The part
Yes, |
MGatner
requested changes
Aug 10, 2022
MGatner
left a comment
Member
There was a problem hiding this comment.
This is good work! Please address the comments.
sclubricants
force-pushed
the
DbTableExists
branch
from
August 10, 2022 21:29
d16bddc to
44d02a8
Compare
Member
Author
|
I added code that detects when cache is out of sync. If out of sync then we call However only if |
MGatner
requested changes
Aug 11, 2022
kenjis
reviewed
Aug 14, 2022
kenjis
reviewed
Aug 14, 2022
kenjis
reviewed
Aug 14, 2022
sclubricants
force-pushed
the
DbTableExists
branch
from
August 14, 2022 19:31
50dbb61 to
8077f2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up #6249
This PR fixes #6351
In
Forge::createTable()This PR forces to check if table exists rather than relying on cache.
We add $tableName param to
Connection::_listTables(). This allows us to lookup only one table rather than return a full list of tables.Checklist: