@@ -11,6 +11,14 @@ class QueryBuilder implements QueryMethodsInterface
1111 public const ASC = 'ASC ' ;
1212 public const DESC = 'DESC ' ;
1313
14+ public const INNER = 'INNER ' ;
15+ public const LEFT = 'LEFT ' ;
16+ public const RIGHT = 'RIGHT ' ;
17+ public const CROSS = 'CROSS ' ;
18+ public const NATURAL = 'NATURAL ' ;
19+ public const FULL = 'FULL ' ;
20+ public const UNION = 'UNION ' ;
21+
1422 public const SECURE = "_bubu_fw_end_secure_ " ;
1523
1624 protected array $ params = [];
@@ -37,10 +45,12 @@ public function __toString(): string
3745 {
3846 $ request = str_replace ('[TABLE_NAME] ' , $ this ->table , $ this ->action );
3947
40- if (!is_null ($ this ->condition )) $ request .= $ this ->condition ;
41- if (!is_null ($ this ->in )) $ request .= (is_null ($ this ->condition ) ? 'WHERE ' : ' AND ' ) . implode (' AND ' , $ this ->in );
42- if (!is_null ($ this ->orderBy )) $ request .= $ this ->orderBy ;
43- if (!is_null ($ this ->limit )) $ request .= $ this ->limit ;
48+ if (!is_null ($ this ->as )) $ request .= " AS {$ this ->as }" ;
49+ if (!is_null ($ this ->join )) $ request .= " {$ this ->join }" ;
50+ if (!is_null ($ this ->condition )) $ request .= $ this ->condition ;
51+ if (!is_null ($ this ->in )) $ request .= (is_null ($ this ->condition ) ? 'WHERE ' : ' AND ' ) . implode (' AND ' , $ this ->in );
52+ if (!is_null ($ this ->orderBy )) $ request .= $ this ->orderBy ;
53+ if (!is_null ($ this ->limit )) $ request .= $ this ->limit ;
4454
4555 return $ request ;
4656 }
0 commit comments