@blazetrails/pg
The PostgreSQL client, mirroring Ruby's pg gem
| Measure | Value |
|---|---|
| Rails counterpart | pg v1.6.2 |
| API methods matched | 100% (120 of 120) |
| Rails tests matched | 100% (28 of 28) (360 permanent) |
| Ruby files ported | 19 |
| Ruby files unported | 0 |
| Measured at | fe89b44726 |
Gaps by file
No gaps recorded for this package.
Missing methods
None recorded for this package.
Unported Ruby files
Every compared Ruby file has a TypeScript file.
Deviation receipts
JSDoc receipt tags in the package's source, by the receipt each carries.
| Tag | PERMANENT | CONVERGEABLE | none |
|---|---|---|---|
@noRailsEquivalent | 21 | 0 | 0 |
@missingRailsCall | 1 | 0 | 0 |
@missingRailsArgs | 5 | 0 | 0 |
@inventedArm | 3 | 0 | 0 |
@internal | 0 | 0 | 56 |
Permanently skipped tests
A String has no encoding tag either (1)
Ratified deviations
Each rule below is ratified in the repository's CLAUDE.md files. The first paragraph is quoted; the link opens the full section at this build's commit.
A String has no encoding tag either
str.encoding, force_encoding and String#b read or change a per-object encoding. A JS string has none, and trails adds none: the carrier that would hold it is the carrier this section rejects. ruby-compat tags a Uint8Array only. A Rails body that branches on a String's encoding ports the UTF-8 arm, and a test asserting str.encoding is permanently unportable for that assertion.
The pg port carries only what trails calls (PG::Connection, PG::Result)
@blazetrails/pg wraps the pg npm client (node-pg) the way packages/bcrypt wraps bcryptjs. The gem's Ruby files and its C extension (vendor/pg/v1.6.2/ext/) define far more than Rails uses: large objects, pipeline mode, the sync_* / async_* / send_* variants, SSL and trace hooks, connection-info readers and PG::Result's field accessors. Most of it is libpq surface that node-pg, which speaks the wire protocol itself, does not expose.