MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / execute

Method execute

packages/db/src/clickhouse/query-builder.ts:549–564  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

547
548 // Execution methods
549 async execute(): Promise<T[]> {
550 const query = this.buildQuery();
551 // console.log(
552 // 'query',
553 // `${query.replaceAll('\n', ' ').replaceAll('\t', ' ').replaceAll('\r', ' ')} SETTINGS session_timezone = '${this.timezone}'`,
554 // );
555
556 const result = await this.client.query({
557 query,
558 clickhouse_settings: {
559 session_timezone: this.timezone,
560 },
561 });
562 const json = await result.json<T>();
563 return this.transformJson(json).data;
564 }
565
566 // Debug methods
567 toSQL(): string {

Callers 15

runReportFunction · 0.80
runReportFromConfigFunction · 0.80
getFunnelMethod · 0.80
getReportDataCoreFunction · 0.80
byIdMethod · 0.80
querySessionsCoreFunction · 0.80
getTopPagesMethod · 0.80
getTopEntryExitMethod · 0.80
getTopGenericMethod · 0.80

Calls 3

buildQueryMethod · 0.95
transformJsonMethod · 0.95
queryMethod · 0.80

Tested by

no test coverage detected