ICompositeExpression.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCP\DB\QueryBuilder;
  8. /**
  9. * This class provides a wrapper around Doctrine's CompositeExpression
  10. * @since 8.2.0
  11. */
  12. interface ICompositeExpression {
  13. /**
  14. * Adds multiple parts to composite expression.
  15. *
  16. * @param array $parts
  17. *
  18. * @return ICompositeExpression
  19. * @since 8.2.0
  20. */
  21. public function addMultiple(array $parts = []): ICompositeExpression;
  22. /**
  23. * Adds an expression to composite expression.
  24. *
  25. * @param mixed $part
  26. *
  27. * @return ICompositeExpression
  28. * @since 8.2.0
  29. */
  30. public function add($part): ICompositeExpression;
  31. /**
  32. * Retrieves the amount of expressions on composite expression.
  33. *
  34. * @return integer
  35. * @since 8.2.0
  36. */
  37. public function count(): int;
  38. /**
  39. * Returns the type of this composite expression (AND/OR).
  40. *
  41. * @return string
  42. * @since 8.2.0
  43. */
  44. public function getType(): string;
  45. }