This is so it can be used in places that typehint an IDatabase,
ultimately so that I can make phan-taint-check happy.
Bug: T216348
Change-Id: Iabf3e9a6add380322a12cdbb6a337bad690f1370
return $this->__call( __FUNCTION__, func_get_args() );
}
+ public function addIdentifierQuotes( $s ) {
+ return $this->__call( __FUNCTION__, func_get_args() );
+ }
+
public function buildLike() {
return $this->__call( __FUNCTION__, func_get_args() );
}
}
}
- /**
- * Quotes an identifier using `backticks` or "double quotes" depending on the database type.
- * MySQL uses `backticks` while basically everything else uses double quotes.
- * Since MySQL is the odd one out here the double quotes are our generic
- * and we implement backticks in DatabaseMysqlBase.
- *
- * @param string $s
- * @return string
- */
public function addIdentifierQuotes( $s ) {
return '"' . str_replace( '"', '""', $s ) . '"';
}
*/
public function addQuotes( $s );
+ /**
+ * Quotes an identifier, in order to make user controlled input safe
+ *
+ * Depending on the database this will either be `backticks` or "double quotes"
+ *
+ * @param string $s
+ * @return string
+ * @since 1.33
+ */
+ public function addIdentifierQuotes( $s );
+
/**
* LIKE statement wrapper, receives a variable-length argument list with
* parts of pattern to match containing either string literals that will be