(first, rest, parameters, types, options)
| 134 | } |
| 135 | |
| 136 | function select(first, rest, parameters, types, options) { |
| 137 | typeof first === 'string' && (first = [first].concat(rest)) |
| 138 | if (Array.isArray(first)) |
| 139 | return escapeIdentifiers(first, options) |
| 140 | |
| 141 | let value |
| 142 | const columns = rest.length ? rest.flat() : Object.keys(first) |
| 143 | return columns.map(x => { |
| 144 | value = first[x] |
| 145 | return ( |
| 146 | value instanceof Query ? fragment(value, parameters, types, options) : |
| 147 | value instanceof Identifier ? value.value : |
| 148 | handleValue(value, parameters, types, options) |
| 149 | ) + ' as ' + escapeIdentifier(options.transform.column.to ? options.transform.column.to(x) : x) |
| 150 | }).join(',') |
| 151 | } |
| 152 | |
| 153 | const builders = Object.entries({ |
| 154 | values, |
nothing calls this directly
no test coverage detected