( input: OrderByInput<table> | undefined, )
| 91 | } |
| 92 | |
| 93 | export function normalizeOrderByInput<table extends AnyTable>( |
| 94 | input: OrderByInput<table> | undefined, |
| 95 | ): OrderByTuple<table>[] { |
| 96 | if (!input) { |
| 97 | return [] |
| 98 | } |
| 99 | |
| 100 | if (input.length === 0) { |
| 101 | return [] |
| 102 | } |
| 103 | |
| 104 | if (Array.isArray(input[0])) { |
| 105 | return input as OrderByTuple<table>[] |
| 106 | } |
| 107 | |
| 108 | return [input as OrderByTuple<table>] |
| 109 | } |
| 110 | |
| 111 | export function toWriteResult(result: WriteResult | WriteRowsResult<unknown>): WriteResult { |
| 112 | return { |
no outgoing calls
no test coverage detected
searching dependent graphs…