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

Method select

packages/db/src/clickhouse/query-builder.ts:85–103  ·  view source on GitHub ↗
(
    columns: (string | Expression | null | undefined | false)[],
    type: 'merge' | 'replace' = 'replace'
  )

Source from the content-addressed store, hash-verified

83
84 // Select methods
85 select<U>(
86 columns: (string | Expression | null | undefined | false)[],
87 type: 'merge' | 'replace' = 'replace'
88 ): Query<U> {
89 if (this._skipNext) {
90 return this as unknown as Query<U>;
91 }
92 if (type === 'merge') {
93 this._select = [
94 ...this._select,
95 ...columns.filter((col): col is string | Expression => Boolean(col)),
96 ];
97 } else {
98 this._select = columns.filter((col): col is string | Expression =>
99 Boolean(col)
100 );
101 }
102 return this as unknown as Query<U>;
103 }
104
105 except(columns: string[]): this {
106 this._except = [...this._except, ...columns];

Callers 15

buildFunnelCteMethod · 0.80
buildSessionsCteMethod · 0.80
getFunnelMethod · 0.80
byIdMethod · 0.80
querySessionsCoreFunction · 0.80
createRevenueQueryMethod · 0.80
getTopPagesMethod · 0.80
getTopEntryExitMethod · 0.80
getDistinctSessionsMethod · 0.80

Calls

no outgoing calls

Tested by 1

buildWhereSQLFunction · 0.64