buffer(obj, raw) {
        obj = resolveFunc(obj);
        if (isNull(obj)) {
            throwIfRaw(raw);
            return 'null';
        }
        if (obj instanceof Buffer) {
            return $to.buffer(obj, raw);
        }
        throw new TypeError(`${wrapText(obj)} is not a Buffer object.`);
    }
@method formatting.buffer
@description
Converts an object of type `Buffer` into a hex string compatible with PostgreSQL type `bytea`.

@param {Buffer|function} obj
Object to be converted, or a function that returns one.

@param {boolean} [raw=false]
Indicates when not to wrap the resulting string in quotes.

The generated hex string doesn't need to be escaped.

@returns {string}