(types)
| 200 | } |
| 201 | |
| 202 | function typeHandlers(types) { |
| 203 | return Object.keys(types).reduce((acc, k) => { |
| 204 | types[k].from && [].concat(types[k].from).forEach(x => acc.parsers[x] = types[k].parse) |
| 205 | if (types[k].serialize) { |
| 206 | acc.serializers[types[k].to] = types[k].serialize |
| 207 | types[k].from && [].concat(types[k].from).forEach(x => acc.serializers[x] = types[k].serialize) |
| 208 | } |
| 209 | return acc |
| 210 | }, { parsers: {}, serializers: {} }) |
| 211 | } |
| 212 | |
| 213 | function escapeIdentifiers(xs, { transform: { column } }) { |
| 214 | return xs.map(x => escapeIdentifier(column.to ? column.to(x) : x)).join(',') |
no test coverage detected