The join_operator should be one of INNER, LEFT OUTER, CROSS etc - this
will be prepended to JOIN.
The table should be the name of the table to join to.
The constraint may be either a string or an array with three elements. If it
is a string, it will be compiled into the query as-is, with no escaping. The
recommended way to supply the constraint is as an array with three elements:
first_column, operator, second_column
Example: array('user.id', '=', 'profile.user_id')
will compile to
ON user.id = profile.user_id
The final (optional) argument specifies an alias for the joined table.