2015-07-06 12:00:01 +02:00
|
|
|
<?php
|
2024-05-23 09:26:56 +02:00
|
|
|
|
2015-07-06 12:00:01 +02:00
|
|
|
/**
|
2024-05-23 09:26:56 +02:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2015-07-06 12:00:01 +02:00
|
|
|
*/
|
2015-07-07 17:30:26 +02:00
|
|
|
namespace OCP\DB\QueryBuilder;
|
2015-07-06 12:00:01 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This class provides a wrapper around Doctrine's CompositeExpression
|
|
|
|
* @since 8.2.0
|
|
|
|
*/
|
|
|
|
interface ICompositeExpression {
|
|
|
|
/**
|
|
|
|
* Adds multiple parts to composite expression.
|
|
|
|
*
|
|
|
|
* @param array $parts
|
|
|
|
*
|
2016-05-17 17:38:25 +02:00
|
|
|
* @return ICompositeExpression
|
2015-07-06 12:00:01 +02:00
|
|
|
* @since 8.2.0
|
|
|
|
*/
|
2021-03-04 21:47:44 +01:00
|
|
|
public function addMultiple(array $parts = []): ICompositeExpression;
|
2015-07-06 12:00:01 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds an expression to composite expression.
|
|
|
|
*
|
|
|
|
* @param mixed $part
|
|
|
|
*
|
2016-05-17 17:38:25 +02:00
|
|
|
* @return ICompositeExpression
|
2015-07-06 12:00:01 +02:00
|
|
|
* @since 8.2.0
|
|
|
|
*/
|
2021-03-04 21:47:44 +01:00
|
|
|
public function add($part): ICompositeExpression;
|
2015-07-06 12:00:01 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieves the amount of expressions on composite expression.
|
|
|
|
*
|
|
|
|
* @return integer
|
|
|
|
* @since 8.2.0
|
|
|
|
*/
|
2021-03-04 21:47:44 +01:00
|
|
|
public function count(): int;
|
2015-07-06 12:00:01 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the type of this composite expression (AND/OR).
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
* @since 8.2.0
|
|
|
|
*/
|
2021-03-04 21:47:44 +01:00
|
|
|
public function getType(): string;
|
2015-07-06 12:00:01 +02:00
|
|
|
}
|