MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / fork

Method fork

class/wptoolkitModel/sqlite_easy.py:2757–2783  ·  view source on GitHub ↗

@name 克隆一个查询构造器 @author Zhj<2022-07-19> @return SqliteEasy|None

(self)

Source from the content-addressed store, hash-verified

2755 return self
2756
2757 def fork(self):
2758 ''&#x27;
2759 @name 克隆一个查询构造器
2760 @author Zhj<2022-07-19>
2761 @return SqliteEasy|None
2762 ''&#x27;
2763 if self.__DB is None:
2764 return None
2765
2766 query = self.__DB.query()
2767 query.set_pk(self.__PK)
2768 if self.__FROM_SUB_QUERY:
2769 query.from_sub_query(self.__DB_TABLE)
2770 else:
2771 query.table(self.__DB_TABLE)
2772 query.prefix(self.__OPT_PREFIX)
2773 query.alias(self.__OPT_ALIAS)
2774 query.set_where_obj(copy.deepcopy(self.__OPT_WHERE))
2775 query.set_limit_obj(copy.deepcopy(self.__OPT_LIMIT))
2776 query.set_order_obj(copy.deepcopy(self.__OPT_ORDER))
2777 query.set_field_obj(copy.deepcopy(self.__OPT_FIELD))
2778 query.set_group_obj(copy.deepcopy(self.__OPT_GROUP))
2779 query.set_having_obj(copy.deepcopy(self.__OPT_HAVING))
2780 query.set_join_obj(copy.deepcopy(self.__OPT_JOIN))
2781 query.set_update_obj(copy.deepcopy(self.__OPT_UPDATE))
2782
2783 return query
2784
2785 def explain_raw_sql(self, raw_sql, bind_params=()):
2786 ''&#x27;

Callers 6

fetch_listMethod · 0.45
remove_pluginsMethod · 0.45
update_plugins_stateMethod · 0.45
remove_themesMethod · 0.45
update_theme_stateMethod · 0.45
listMethod · 0.45

Calls 14

queryMethod · 0.45
set_pkMethod · 0.45
from_sub_queryMethod · 0.45
tableMethod · 0.45
prefixMethod · 0.45
aliasMethod · 0.45
set_where_objMethod · 0.45
set_limit_objMethod · 0.45
set_order_objMethod · 0.45
set_field_objMethod · 0.45
set_group_objMethod · 0.45
set_having_objMethod · 0.45

Tested by

no test coverage detected