Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * This file is part of the sshilko/php-sql-mydb package.
4 *
5 * (c) Sergei Shilko <contact@sshilko.com>
6 *
7 * MIT License
8 *
9 * For the full copyright and license information, please view the LICENSE
10 * file that was distributed with this source code.
11 * @license https://opensource.org/licenses/mit-license.php MIT
12 */
13
14declare(strict_types = 1);
15
16namespace sql;
17
18/**
19 * @author Sergei Shilko <contact@sshilko.com>
20 * @license https://opensource.org/licenses/mit-license.php MIT
21 * @see https://github.com/sshilko/php-sql-mydb
22 */
23interface MydbOptionsInterface
24{
25    /**
26     * @see https://dev.mysql.com/doc/refman/8.0/en/innodb-transaction-isolation-levels.html
27     */
28    public const TRANSACTION_ISOLATION_LEVEL_DEFAULT          = 'REPEATABLE READ';
29    public const TRANSACTION_ISOLATION_LEVEL_REPEATABLE_READ  = 'REPEATABLE READ';
30    public const TRANSACTION_ISOLATION_LEVEL_READ_COMMITTED   = 'READ COMMITTED';
31    public const TRANSACTION_ISOLATION_LEVEL_READ_UNCOMMITTED = 'READ UNCOMMITTED';
32    public const TRANSACTION_ISOLATION_LEVEL_SERIALIZABLE     = 'SERIALIZABLE';
33
34    public function getNonInteractiveTimeout(): int;
35
36    public function setNonInteractiveTimeout(int $nonInteractiveTimeout): void;
37
38    public function getServerSideSelectTimeout(): int;
39
40    public function setServerSideSelectTimeout(int $seconds): void;
41
42    public function getConnectTimeout(): int;
43
44    public function setConnectTimeout(int $seconds): void;
45
46    public function getErrorReporting(): int;
47
48    public function setErrorReporting(int $errorReporting): void;
49
50    public function getReadTimeout(): int;
51
52    public function setReadTimeout(int $seconds): void;
53
54    public function getNetworkBufferSize(): int;
55
56    public function setNetworkBufferSize(int $bytes): void;
57
58    public function getNetworkReadBuffer(): int;
59
60    public function setNetworkReadBuffer(int $bytes): void;
61
62    public function getClientErrorLevel(): int;
63
64    public function setClientErrorLevel(int $mysqliReport): void;
65
66    public function getTimeZone(): string;
67
68    public function setTimeZone(string $timeZone): void;
69
70    public function isAutocommit(): bool;
71
72    public function setAutocommit(bool $autocommit): void;
73
74    public function getCharset(): string;
75
76    public function getTransactionIsolationLevel(): ?string;
77
78    public function setTransactionIsolationLevel(string $isolationLevel): void;
79
80    public function setCharset(string $charset): void;
81
82    public function isPersistent(): bool;
83
84    public function setPersistent(bool $persistent): void;
85
86    public function isReadonly(): bool;
87
88    public function setReadonly(bool $readonly): void;
89}