$this->readDb = $db;
}
- /**
- * Gets if the object can take a certain field.
- *
- * @since 1.20
- *
- * @param string $name
- *
- * @return boolean
- */
- public function canHaveField( $name ) {
- return array_key_exists( $name, $this->table->getFieldTypes() );
- }
-
/**
* Add an amount (can be negative) to the specified field (needs to be numeric).
*
* Returns the amount of matching records.
* Condition field names get prefixed.
*
+ * Note that this can be expensive on large tables.
+ * In such cases you might want to use DatabaseBase::estimateRowCount instead.
+ *
* @since 1.20
*
* @param array $conditions
public function getFieldNames() {
return array_keys( $this->getFieldTypes() );
}
+
+ /**
+ * Gets if the object can take a certain field.
+ *
+ * @since 1.20
+ *
+ * @param string $name
+ *
+ * @return boolean
+ */
+ public function canHaveField( $name ) {
+ return array_key_exists( $name, $this->getFieldTypes() );
+ }
}