File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55/**
66 * @template TConfig of SqlConfig
77 * @template TResult of Result
8- * @template TStatement of Statement
8+ * @template TStatement of Statement<TResult>
99 * @template TTransaction of Transaction
1010 *
1111 * @extends Link<TResult, TStatement, TTransaction>
@@ -16,4 +16,11 @@ interface Connection extends Link
1616 * @return TConfig The configuration used to create this connection.
1717 */
1818 public function getConfig (): SqlConfig ;
19+
20+ /**
21+ * Sets the transaction isolation level for transactions began on this link.
22+ *
23+ * @see Link::beginTransaction()
24+ */
25+ public function setTransactionIsolation (TransactionIsolation $ isolation ): void ;
1926}
Original file line number Diff line number Diff line change 55/**
66 * @template TResult of Result
77 * @template TStatement of Statement
8- * @template TTransaction of Transaction
98 */
109interface Executor extends TransientResource
1110{
@@ -42,11 +41,4 @@ public function prepare(string $sql): Statement;
4241 * @throws QueryError If the operation fails due to an error in the query (such as a syntax error).
4342 */
4443 public function execute (string $ sql , array $ params = []): Result ;
45-
46- /**
47- * Starts a transaction, returning an object where all queries are executed on a single connection.
48- *
49- * @return TTransaction
50- */
51- public function beginTransaction (): Transaction ;
5244}
Original file line number Diff line number Diff line change 44
55/**
66 * @template TResult of Result
7- * @template TStatement of Statement
7+ * @template TStatement of Statement<TResult>
88 * @template TTransaction of Transaction
99 *
10- * @extends Executor<TResult, TStatement, TTransaction >
10+ * @extends Executor<TResult, TStatement>
1111 */
1212interface Link extends Executor
1313{
1414 /**
15- * Sets the transaction isolation level for transactions began on this link .
15+ * Starts a transaction, returning an object where all queries are executed on a single connection .
1616 *
17- * @see Executor::beginTransaction()
17+ * @return TTransaction
1818 */
19- public function setTransactionIsolation ( TransactionIsolation $ isolation ): void ;
19+ public function beginTransaction ( ): Transaction ;
2020}
Original file line number Diff line number Diff line change 66 * @template TResult of Result
77 * @template TStatement of Statement<TResult>
88 * @template TTransaction of Transaction
9- * @extends Executor<TResult, TStatement, TTransaction>
9+ *
10+ * @extends Link<TResult, TStatement, TTransaction>
1011 */
11- interface Transaction extends Executor
12+ interface Transaction extends Link
1213{
1314 public function getIsolationLevel (): TransactionIsolation ;
1415
You can’t perform that action at this time.
0 commit comments