*/ public function config(): array; /** * Executes a callable function inside a transaction, if any exception occurs * while executing the passed callable, the transaction will be rolled back * If the result of the callable function is `false`, the transaction will * also be rolled back. Otherwise, the transaction is committed after executing * the callback. * * The callback will receive the connection instance as its first argument. * * ### Example: * * ``` * $connection->transactional(function ($connection) { * $connection->newQuery()->delete('users')->execute(); * }); * ``` * * @param callable $callback The callback to execute within a transaction. * @return mixed The return value of the callback. * @throws \Exception Will re-throw any exception raised in $callback after * rolling back the transaction. */ public function transactional(callable $callback); /** * Run an operation with constraints disabled. * * Constraints should be re-enabled after the callback succeeds/fails. * * ### Example: * * ``` * $connection->disableConstraints(function ($connection) { * $connection->newQuery()->delete('users')->execute(); * }); * ``` * * @param callable $callback The callback to execute within a transaction. * @return mixed The return value of the callback. * @throws \Exception Will re-throw any exception raised in $callback after * rolling back the transaction. */ public function disableConstraints(callable $callback); /** * Enable/disable query logging * * @param bool $enable Enable/disable query logging * @return $this */ public function enableQueryLogging(bool $enable = true); /** * Disable query logging * * @return $this */ public function disableQueryLogging(); /** * Check if query logging is enabled. * * @return bool */ public function isQueryLoggingEnabled(): bool; }