{"repo":"goatplatform/orderstamp-js","free":true,"listed":false,"github":"https://github.com/goatplatform/orderstamp-js","clone":"git clone https://github.com/goatplatform/orderstamp-js.git","description":"A lightweight TypeScript utility providing efficient, O(1) ordered list management in databases, simplifying insertions and reordering.","language":"TypeScript","stars":14,"topics":["algorithms","big-data","database","typescript"],"license":"MIT","category":"databases-storage","readme_excerpt":"Orderstamp Orderstamp is a TypeScript utility for maintaining large ordered lists in databases with minimal write operations. It provides efficient, string-based ordering suitable for any database supporting string sorting. --- ⚠️ IMPORTANT: Ensure your database is configured to use lexicographical (string) ordering on the order stamp column. Orderstamp relies on string sorting for correct ordering. If your database uses numeric or other types of sorting on the order stamp column, the ordering will be incorrect. Always use a string/text/varchar type and verify that queries sort the column lexicographically. --- Table of Contents - Overview - Installation - API Reference - Usage Guidelines - String Growth and Bulk Allocation - Performance - Testing and Benchmarks - Dependencies - License Overview Traditional approaches to ordered lists in databases are inefficient: - Storing the entire list as a single row does not scale. - Using integer order columns requires O(n) writes for insertions. Orderstamp addresses these issues by: - Enabling O(1) writes for insertions, deletions, and moves. - Requiring only a standard string index for ordered queries. - Avoiding reindexing or mass updates when changing item positions. Orderstamp is database-agnostic and works with any system that supports string sorting. Installation npm : Deno : Bun : pnpm : or (for pnpm 10.8 or older): yarn : or (for Yarn 4.8 or older): API Reference Function Purpose Use Case ----------- --------------------------","default_branch":null,"files":null,"tree":[],"storefront":"/r/goatplatform","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/goatplatform/orderstamp-js/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}