]> source.dussan.org Git - nextcloud-server.git/commitdiff
rename fun to func 3089/head
authorRobin Appelman <robin@icewind.nl>
Sun, 26 Mar 2017 18:45:49 +0000 (20:45 +0200)
committerRobin Appelman <robin@icewind.nl>
Thu, 30 Mar 2017 09:15:06 +0000 (11:15 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/DB/QueryBuilder/QueryBuilder.php
lib/private/Files/Cache/Cache.php
lib/public/DB/QueryBuilder/IQueryBuilder.php
tests/lib/DB/QueryBuilder/FunctionBuilderTest.php

index 3ff31de19a3f6a82f365393138ae48242711ddf1..eac13b452ac0a948dd220501f53a42d4495754b1 100644 (file)
@@ -139,7 +139,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) {
index ce3e38dd46fcc86437fafc4bc0cacbd264599a9d..1f3f2433e45cc6bc53211eb60dc9bd120dbc343a 100644 (file)
@@ -529,7 +529,7 @@ class Cache implements ICache {
                                $sourceLength = strlen($sourcePath);
                                $query = $this->connection->getQueryBuilder();
 
-                               $fun = $query->fun();
+                               $fun = $query->func();
                                $newPathFunction = $fun->concat(
                                        $query->createNamedParameter($targetPath),
                                        $fun->substring('path', $query->createNamedParameter($sourceLength + 1, IQueryBuilder::PARAM_INT))// +1 for the leading slash
index 2a88e7ac5667e19f6edd61dacb2409b6d24ae890..a176bb917a39c47c0b9d3c1bdfde7e280c23a488 100644 (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.
index b1ef3d7bb75eccacd21695817edbe1998240d60e..c270e105fc143d48e0c78c3396073387bc00d9a9 100644 (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());
        }