escape = arg => {
  if (arg === undefined) throw Error('Error: parameter is undefined')
  if (arg === null) return 'null'
  if (typeof arg === 'string') return escapeLiteral(arg)
  if (
    typeof arg === 'number' ||
    typeof arg == 'bigint' ||
    typeof arg == 'boolean'
  )
    return '' + arg
  if (typeof arg === 'object') {
    if (Array.isArray(arg)) {
      return `array[${arg.map(e => escape(e)).join(', ')}]`
    } else {
      return escapeLiteral(JSON.stringify(arg))
    }
  }
  throw Error(`Invalid argument SQL argument of type '${typeof arg}'`, arg)
}
Escapes an argument for use in UNPARAMETERIZED queries. NOT SAFE AT ALL.