Skip to content

Commit

Permalink
Add Driver::disableAutoQuoting().
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Nov 1, 2018
1 parent 631e7df commit 2ca0486
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/Database/Driver.php
Expand Up @@ -362,6 +362,19 @@ public function enableAutoQuoting($enable = true)
return $this;
}

/**
* Disable auto quoting of identifiers in queries.
*
* @return $this
*/

public function disableAutoQuoting()
{
$this->_autoQuoting = false;

return $this;
}

/**
* {@inheritDoc}
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Database/DriverInterface.php
Expand Up @@ -18,6 +18,8 @@

/**
* Interface for database driver.
*
* @method $this disableAutoQuoting()
*/
interface DriverInterface
{
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Database/DriverTest.php
Expand Up @@ -198,7 +198,7 @@ public function testAutoQuoting()
$this->assertSame($this->driver, $this->driver->enableAutoQuoting(true));
$this->assertTrue($this->driver->isAutoQuotingEnabled());

$this->driver->enableAutoQuoting(false);
$this->driver->disableAutoQuoting();
$this->assertFalse($this->driver->isAutoQuotingEnabled());

$this->driver->enableAutoQuoting('string');
Expand Down

0 comments on commit 2ca0486

Please sign in to comment.