@@ -20,6 +20,8 @@ abstract class Adapter
2020
2121 protected bool $ tenantPerDocument = false ;
2222
23+ protected int $ timeout = 0 ;
24+
2325 protected int $ inTransaction = 0 ;
2426
2527 /**
@@ -275,13 +277,18 @@ public function resetMetadata(): static
275277 * and an appropriate error or exception will be raised to handle the timeout condition.
276278 *
277279 * @param int $milliseconds The timeout value in milliseconds for database queries.
278- * @param string $event The event the timeout should fire fore
280+ * @param string $event The event the timeout should fire for
279281 * @return void
280282 *
281283 * @throws Exception The provided timeout value must be greater than or equal to 0.
282284 */
283285 abstract public function setTimeout (int $ milliseconds , string $ event = Database::EVENT_ALL ): void ;
284286
287+ public function getTimeout (): int
288+ {
289+ return $ this ->timeout ;
290+ }
291+
285292 /**
286293 * Clears a global timeout for database queries.
287294 *
@@ -963,22 +970,22 @@ abstract public function getCountOfIndexes(Document $collection): int;
963970 *
964971 * @return int
965972 */
966- abstract public static function getCountOfDefaultAttributes (): int ;
973+ abstract public function getCountOfDefaultAttributes (): int ;
967974
968975 /**
969976 * Returns number of indexes used by default.
970977 *
971978 * @return int
972979 */
973- abstract public static function getCountOfDefaultIndexes (): int ;
980+ abstract public function getCountOfDefaultIndexes (): int ;
974981
975982 /**
976983 * Get maximum width, in bytes, allowed for a SQL row
977984 * Return 0 when no restrictions apply
978985 *
979986 * @return int
980987 */
981- abstract public static function getDocumentSizeLimit (): int ;
988+ abstract public function getDocumentSizeLimit (): int ;
982989
983990 /**
984991 * Estimate maximum number of bytes required to store a document in $collection.
0 commit comments