Postgres Tree
JSON →A lightweight library for implementing hierarchical tree structures in PostgreSQL using closure tables. Current stable version 1.1.3 (last updated 2020). It provides an intuitive API for building, querying, and manipulating tree data, including adding nodes, inserting in specific positions, moving subtrees, and viewing the tree hierarchy. Differentiators include automatic table creation, a chainable builder API, and support for flexible tree operations without requiring raw SQL. Unlike ORM-based solutions, it offers a focused, minimal interface for tree structures, but it ties directly to pg Pool configuration via environment variables. Release cadence is low (sporadic); development appears to be in maintenance mode.
Resources
packagepostgres-tree ↗