src/ConstraintRepositoryLookup.php 1 location
|
@@ 38-48 (lines=11) @@
|
| 35 |
|
* |
| 36 |
|
* @return Constraint[] |
| 37 |
|
*/ |
| 38 |
|
public function queryConstraintsForProperty( PropertyId $propertyId ) { |
| 39 |
|
$dbr = $this->lb->getConnectionRef( ILoadBalancer::DB_REPLICA, [], $this->dbName ); |
| 40 |
|
|
| 41 |
|
$results = $dbr->select( |
| 42 |
|
'wbqc_constraints', |
| 43 |
|
'*', |
| 44 |
|
[ 'pid' => $propertyId->getNumericId() ] |
| 45 |
|
); |
| 46 |
|
|
| 47 |
|
return $this->convertToConstraints( $results ); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
/** |
| 51 |
|
* @param IResultWrapper $results |
src/ConstraintRepositoryStore.php 1 location
|
@@ 72-80 (lines=9) @@
|
| 69 |
|
* |
| 70 |
|
* @throws DBUnexpectedError |
| 71 |
|
*/ |
| 72 |
|
public function deleteForProperty( PropertyId $propertyId ) { |
| 73 |
|
$dbw = $this->lb->getConnection( ILoadBalancer::DB_MASTER, [], $this->dbName ); |
| 74 |
|
$dbw->delete( |
| 75 |
|
'wbqc_constraints', |
| 76 |
|
[ |
| 77 |
|
'pid' => $propertyId->getNumericId(), |
| 78 |
|
] |
| 79 |
|
); |
| 80 |
|
} |
| 81 |
|
|
| 82 |
|
} |
| 83 |
|
|