(
columns: (string | Expression | null | undefined | false)[],
type: 'merge' | 'replace' = 'replace'
)
| 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]; |
no outgoing calls