Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Public Member Functions | |
__construct ($joins='', $wheres='', $params=array(), $cannotmatchanyrows=false) | |
Create an object that contains sql join fragments. More... | |
Public Attributes | |
bool | $cannotmatchanyrows |
if true this join is guaranteed to never match any rows. More... | |
string | $joins |
joins. | |
array | $params |
params. | |
string | $wheres |
wheres. | |
core\dml\sql_join::__construct | ( | $joins = '' , |
|
$wheres = '' , |
|||
$params = array() , |
|||
$cannotmatchanyrows = false |
|||
) |
Create an object that contains sql join fragments.
Note, even if you set $cannotmatchanyrows to true, it is important to also set the other fields because the calling code is not required to check it. For example new core::dml::sql_join('', '1 = 2', [], true);
string | $joins | The join sql fragment. |
string | $wheres | The where sql fragment. |
array | $params | Any parameter values. |
bool | $cannotmatchanyrows | If true, this join is guaranteed to match no rows. See comment on the field above. |
bool core\dml\sql_join::$cannotmatchanyrows |
if true this join is guaranteed to never match any rows.
In this case, the calling code may be able to completely skip doing the database query.