code: function formatValue(value, fm, cc) {
  
      if (typeof value === 'function') {
          return formatValue(resolveFunc(value, cc), fm, cc);
      }
  
      const ctf = getCTF(value); // Custom Type Formatting
      if (ctf) {
          fm |= ctf.rawType ? fmFlags.raw : 0;
          return formatValue(resolveFunc(ctf.toPostgres, value), fm, cc);
      }
  
      const isRaw = !!(fm & fmFlags.raw);
      fm &= ~fmFlags.raw;
  
      switch (fm) {
          case fmFlags.alias:
              return $as.alias(value);
          case fmFlags.name:
              return $as.name(value);
          case fmFlags.json:
              return $as.json(value, isRaw);
          case fmFlags.csv:
              return $as.csv(value);
          case fmFlags.value:
              return $as.value(value);
          default:
              break;
      }
  
      if (isNull(value)) {
          throwIfRaw(isRaw);
          return 'null';
      }
  
      switch (typeof value) {
          case 'string':
              return $to.text(value, isRaw);
          case 'boolean':
              return $to.bool(value);
          case 'number':
              return $to.number(value);
          case 'symbol':
              throw new TypeError('Type Symbol has no meaning for PostgreSQL: ' + value.toString());
          default:
              if (value instanceof Date) {
                  return $to.date(value, isRaw);
              }
              if (value instanceof Array) {
                  return $to.array(value);
              }
              if (value instanceof Buffer) {
                  return $to.buffer(value, isRaw);
              }
              return $to.json(value, isRaw);
      }
  }
docs: ////////////////////////////////////////////////// Converts a single value into its Postgres format.