aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/DB/QueryBuilder/IQueryBuilder.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-07-31 18:41:11 +0200
committerLouis Chemineau <louis@chmn.me>2024-08-28 10:21:19 +0200
commit62f8b6517f4492b220ebd9df415f2b134735768b (patch)
tree4b1bee39c02d7f2cfeb7c975e4be88579ff3d932 /lib/public/DB/QueryBuilder/IQueryBuilder.php
parentf5b348674449d023367b5e5f84cb4ac1de98605b (diff)
downloadnextcloud-server-62f8b6517f4492b220ebd9df415f2b134735768b.tar.gz
nextcloud-server-62f8b6517f4492b220ebd9df415f2b134735768b.zip
feat: implement distributing partitioned queries over multiple shards
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public/DB/QueryBuilder/IQueryBuilder.php')
-rw-r--r--lib/public/DB/QueryBuilder/IQueryBuilder.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php
index e14514ac254..df93a0b1ed5 100644
--- a/lib/public/DB/QueryBuilder/IQueryBuilder.php
+++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php
@@ -1010,6 +1010,15 @@ interface IQueryBuilder {
public function getTableName($table);
/**
+ * Returns the table name with database prefix as needed by the implementation
+ *
+ * @param string $table
+ * @return string
+ * @since 30.0.0
+ */
+ public function prefixTableName(string $table): string;
+
+ /**
* Returns the column name quoted and with table alias prefix as needed by the implementation
*
* @param string $column
@@ -1020,6 +1029,24 @@ interface IQueryBuilder {
public function getColumnName($column, $tableAlias = '');
/**
+ * Provide a hint for the shard key for queries where this can't be detected otherwise
+ *
+ * @param string $column
+ * @param mixed $value
+ * @return $this
+ * @since 30.0.0
+ */
+ public function hintShardKey(string $column, mixed $value);
+
+ /**
+ * Set the query to run across all shards if sharding is enabled.
+ *
+ * @return $this
+ * @since 30.0.0
+ */
+ public function runAcrossAllShards();
+
+ /**
* Get a list of column names that are expected in the query output
*
* @return array