(decoder oid)Returns a function of (b off n) that reads one column value of the given type from n bytes of b, its DataRow's bytes, starting at index off: b is a byte array on the JVM and a Node Buffer in JS. Simple queries always return values in text format, so each type parses its text. Unknown OIDs return the raw bytes.
Returns a function of (b off n) that reads one column value of the given type from n bytes of b, its DataRow's bytes, starting at index off: b is a byte array on the JVM and a Node Buffer in JS. Simple queries always return values in text format, so each type parses its text. Unknown OIDs return the raw bytes.
(param-text v)The text Postgres reads for a query parameter, or nil for NULL. Strings, numbers, booleans and UUIDs go as written, bytes as bytea hex, and dates and times in ISO format. Postgres infers each parameter's type from the query, so a parameter whose type the query doesn't fix, as in SELECT $1, needs a cast such as $1::int4.
The text Postgres reads for a query parameter, or nil for NULL. Strings, numbers, booleans and UUIDs go as written, bytes as bytea hex, and dates and times in ISO format. Postgres infers each parameter's type from the query, so a parameter whose type the query doesn't fix, as in SELECT $1, needs a cast such as $1::int4.
(text b off n)The value's bytes as UTF-8 text. In JS, Buffer's toString decodes them in place, at about half the cost of a TextDecoder and the Uint8Array it needs. Like the JVM, it keeps a leading byte order mark, which TextDecoder drops.
The value's bytes as UTF-8 text. In JS, Buffer's toString decodes them in place, at about half the cost of a TextDecoder and the Uint8Array it needs. Like the JVM, it keeps a leading byte order mark, which TextDecoder drops.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |