@name 添加关联条件 @author Zhj<2022-07-17> @param exp 表达式 @param condition 关联条件 @param join_type 关联方式 INNER|LEFT|RIGHT @param add_table_prefix 是否添加表前缀[可选 默认自动添加]
(self, exp, condition, join_type='INNER', add_table_prefix=True)
| 1936 | return self |
| 1937 | |
| 1938 | def join(self, exp, condition, join_type='INNER', add_table_prefix=True): |
| 1939 | ''' |
| 1940 | @name 添加关联条件 |
| 1941 | @author Zhj<2022-07-17> |
| 1942 | @param exp<string> 表达式 |
| 1943 | @param condition<string> 关联条件 |
| 1944 | @param join_type<string> 关联方式 INNER|LEFT|RIGHT |
| 1945 | @param add_table_prefix<bool> 是否添加表前缀[可选 默认自动添加] |
| 1946 | @return self |
| 1947 | ''' |
| 1948 | table_prefix = '' |
| 1949 | |
| 1950 | if add_table_prefix and self.__OPT_PREFIX is not None: |
| 1951 | table_prefix = self.__OPT_PREFIX |
| 1952 | |
| 1953 | self.__OPT_JOIN.add_join(exp, condition, join_type, table_prefix) |
| 1954 | return self |
| 1955 | |
| 1956 | def inner_join(self, exp, condition, add_table_prefix=True): |
| 1957 | ''' |