tobogganSe connecter

packages

The Louise packages, each released on its own

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Packages, std: postgres sends known types in binary; `float.parse`

The driver moves known types to PostgreSQL's binary format, per type
(issue #145 §2; the codecs are pure Louise over #143's bit operations and
float bits):

- **The statement cache** (client.lse): the first execution of a SQL text
  on a connection runs Parse + Describe (one exchange) and caches the
  parameter type OIDs and result columns by the text; later executions
  Bind directly. Arity is checked against the cache, with the error
  naming both counts.
- **Parameters** encode per the inferred type OID: big-endian ints
  (int2/int4/int8), IEEE floats (float4/float8), one-byte bools, raw
  bytea, 16-byte UUIDs, timestamptz as microseconds since PostgreSQL's
  epoch — text where there's no codec (or the OID isn't the type's).
- **Results** are requested in binary for those types and decoded per
  (type OID, format code); the row accessors read both formats. `numeric`
  stays text (no decimal type in std yet), as does `text`/`varchar`
  (same bytes either way).
- **`binary.lse`**: the codecs with unit tests against known byte
  patterns. **`protocol.lse`**: `Bind` carries the parameters' format
  codes and the result formats wanted, and `ParameterDescription` is
  parsed; the transcripts are updated.
- **`std/float.parse`** (new runtime extern, both backends): text to
  Float, for the text path of `row.float`.

Live-tested against postgres:18: every existing test now exercises
binary params and results for the known types.

olivier · il y a 1 mois · 8be69a1c1d5dc6f158a88787d2d4827ba9f5bb85

Parents a567f7b

5 fichiers modifiés, 502 ajouts, 99 suppressions