summaryrefslogtreecommitdiff
path: root/www/wiki/includes/libs/rdbms/database/MaintainableDBConnRef.php
blob: ff4b0509670cb110d9ef0f2831f862e20f98d20f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php

namespace Wikimedia\Rdbms;

/**
 * Helper class to handle automatically marking connections as reusable (via RAII pattern)
 * as well handling deferring the actual network connection until the handle is used
 *
 * @note: proxy methods are defined explicity to avoid interface errors
 * @ingroup Database
 * @since 1.29
 */
class MaintainableDBConnRef extends DBConnRef implements IMaintainableDatabase {
	public function tableName( $name, $format = 'quoted' ) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function tableNames() {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function tableNamesN() {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function sourceFile(
		$filename,
		callable $lineCallback = null,
		callable $resultCallback = null,
		$fname = false,
		callable $inputCallback = null
	) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function sourceStream(
		$fp,
		callable $lineCallback = null,
		callable $resultCallback = null,
		$fname = __METHOD__,
		callable $inputCallback = null
	) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function dropTable( $tableName, $fName = __METHOD__ ) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function deadlockLoop() {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function listViews( $prefix = null, $fname = __METHOD__ ) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function textFieldSize( $table, $field ) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function streamStatementEnd( &$sql, &$newLine ) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function duplicateTableStructure(
		$oldName, $newName, $temporary = false, $fname = __METHOD__
	) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function tableLocksHaveTransactionScope() {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function lockTables( array $read, array $write, $method ) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function unlockTables( $method ) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function indexUnique( $table, $index ) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function listTables( $prefix = null, $fname = __METHOD__ ) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}

	public function fieldInfo( $table, $field ) {
		return $this->__call( __FUNCTION__, func_get_args() );
	}
}

class_alias( MaintainableDBConnRef::class, 'MaintainableDBConnRef' );