rename fun to func

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2017-03-26 20:45:49 +02:00
parent f9eda2706a
commit d132b80111
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
3 changed files with 6 additions and 6 deletions

View File

@ -136,7 +136,7 @@ class QueryBuilder implements IQueryBuilder {
*
* @return \OCP\DB\QueryBuilder\IFunctionBuilder
*/
public function fun() {
public function func() {
if ($this->connection instanceof OracleConnection) {
return new OCIFunctionBuilder($this->helper);
} else if ($this->connection->getDatabasePlatform() instanceof SqlitePlatform) {

View File

@ -111,7 +111,7 @@ interface IQueryBuilder {
* @return \OCP\DB\QueryBuilder\IFunctionBuilder
* @since 12.0.0
*/
public function fun();
public function func();
/**
* Gets the type of the currently built query.

View File

@ -43,7 +43,7 @@ class FunctionBuilderTest extends TestCase {
public function testConcat() {
$query = $this->connection->getQueryBuilder();
$query->select($query->fun()->concat($query->createNamedParameter('foo'), new Literal("'bar'")));
$query->select($query->func()->concat($query->createNamedParameter('foo'), new Literal("'bar'")));
$this->assertEquals('foobar', $query->execute()->fetchColumn());
}
@ -51,7 +51,7 @@ class FunctionBuilderTest extends TestCase {
public function testMd5() {
$query = $this->connection->getQueryBuilder();
$query->select($query->fun()->md5($query->createNamedParameter('foobar')));
$query->select($query->func()->md5($query->createNamedParameter('foobar')));
$this->assertEquals(md5('foobar'), $query->execute()->fetchColumn());
}
@ -59,7 +59,7 @@ class FunctionBuilderTest extends TestCase {
public function testSubstring() {
$query = $this->connection->getQueryBuilder();
$query->select($query->fun()->substring($query->createNamedParameter('foobar'), new Literal(2), $query->createNamedParameter(2)));
$query->select($query->func()->substring($query->createNamedParameter('foobar'), new Literal(2), $query->createNamedParameter(2)));
$this->assertEquals('oo', $query->execute()->fetchColumn());
}
@ -67,7 +67,7 @@ class FunctionBuilderTest extends TestCase {
public function testSubstringNoLength() {
$query = $this->connection->getQueryBuilder();
$query->select($query->fun()->substring($query->createNamedParameter('foobar'), new Literal(2)));
$query->select($query->func()->substring($query->createNamedParameter('foobar'), new Literal(2)));
$this->assertEquals('oobar', $query->execute()->fetchColumn());
}