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

Method when

packages/db/src/clickhouse/query-builder.ts:588–593  ·  view source on GitHub ↗
(condition: boolean, callback?: ConditionalCallback)

Source from the content-addressed store, hash-verified

586
587 // Add method for callback-style conditionals
588 when(condition: boolean, callback?: ConditionalCallback): this {
589 if (condition && callback) {
590 callback(this);
591 }
592 return this;
593 }
594
595 clone(): Query<T> {
596 return new Query(this.client, this.timezone).merge(this);

Callers 4

queryMethod · 0.80
getByIdMethod · 0.80
getTopPagesMethod · 0.80
getPageTimeseriesMethod · 0.80

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected