{"id":41954813,"url":"https://github.com/neurlang/table","last_synced_at":"2026-01-25T22:14:21.317Z","repository":{"id":280266039,"uuid":"941461090","full_name":"neurlang/table","owner":"neurlang","description":"Package table implements a memory efficient in-memory multicolumn string table aka multimap/bimap in golang","archived":false,"fork":false,"pushed_at":"2025-11-23T12:45:50.000Z","size":88,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-23T14:21:53.716Z","etag":null,"topics":["bimap","go","golang","multimap","string"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neurlang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-02T10:53:49.000Z","updated_at":"2025-11-23T12:40:21.000Z","dependencies_parsed_at":"2025-03-02T11:31:43.208Z","dependency_job_id":"34141d99-73fa-4591-8923-3644fb6d6875","html_url":"https://github.com/neurlang/table","commit_stats":null,"previous_names":["neurlang/table"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/neurlang/table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurlang%2Ftable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurlang%2Ftable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurlang%2Ftable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurlang%2Ftable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neurlang","download_url":"https://codeload.github.com/neurlang/table/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurlang%2Ftable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28760643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T20:56:06.009Z","status":"ssl_error","status_checked_at":"2026-01-25T20:54:48.203Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bimap","go","golang","multimap","string"],"created_at":"2026-01-25T22:14:20.644Z","updated_at":"2026-01-25T22:14:21.310Z","avatar_url":"https://github.com/neurlang.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 `table`\n\n**A blazing-fast, memory-efficient multicolumn string table (multimap/bimap) for Go.**\nStore billions of rows in RAM, filter by multiple `(column → value)` clauses, and perform high-performance queries with optional “holes” for instant deletion performance.\n\n---\n\n## ✨ Features\n\n✅ In-memory multicolumn string storage\n\n✅ Supports duplicate rows, multi-key lookups, and range queries\n\n✅ Explicit *holes* model for cheap deletes\n\n✅ Manual compaction for full reuse of space\n\n✅ Tiny memory footprint with optional quaternary filters\n\n✅ Zero external dependencies except for `quaternary`\n\n---\n\n## 🚀 Quick Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/neurlang/table\"\n)\n\nfunc main() {\n\tvar t table.Table\n\n\t// Insert rows\n\tdata := [][]string{\n\t\t{\"play\", \"pièce\", \"obra\"},\n\t\t{\"cup\", \"tasse\", \"taza\"},\n\t\t{\"bank\", \"banque\", \"banco\"},\n\t\t{\"coin\", \"pièce\", \"moneda\"},\n\t\t{\"boat\", \"bateau\", \"barco\"},\n\t\t{\"cup\", \"verre\", \"copa\"},\n\t\t{\"earth\", \"terre\", \"tierra\"},\n\t\t{\"land\", \"terre\", \"tierra\"},\n\t\t{\"soap\", \"savon\", \"jabón\"},\n\t\t{\"ice\", \"glace\", \"hielo\"},\n\t\t{\"book\", \"livre\", \"libro\"},\n\t\t{\"room\", \"pièce\", \"habitación\"},\n\t\t{\"cup\", \"coupe\", \"copa\"},\n\t\t{\"glass\", \"verre\", \"copa\"},\n\t\t{\"pie\", \"gâteau\", \"tarta\"},\n\t}\n\tt.Insert(data)\n\tt.Compact()\n\n\t// Query\n\tfmt.Println(\"Cups:\", t.GetAll(0, \"cup\"))\n\tfmt.Println(\"terre:\", t.GetAll(1, \"terre\"))\n\tfmt.Println(\"copa:\", t.GetAll(2, \"copa\"))\n\n\t// Insert more\n\tt.Insert([][]string{\n\t\t{\"bench\", \"banc\", \"banco\"},\n\t\t{\"faucet\", \"robinet\", \"llave\"},\n\t\t{\"key\", \"clé\", \"llave\"},\n\t})\n\tt.Compact()\n\n\tfmt.Println(\"banco:\", t.GetAll(2, \"banco\"))\n\tfmt.Println(\"llave:\", t.GetAll(2, \"llave\"))\n\n\t// Delete by value\n\tt.Remove(1, \"verre\")\n\tfmt.Println(\"Cups after delete:\", t.GetAll(0, \"cup\"))\n}\n```\n\n---\n\n## ⚙️ API Overview\n\n| Method                  | Description                                                                           | Direction |\n| ----------------------- | ------------------------------------------------------------------------------------- | --------- |\n| `Insert(rows)`          | Insert rows. Holes are ignored.                                                       | Write     |\n| `InsertHoles(rows)`     | Insert rows as-is, including holes.                                                   | Write     |\n| `Remove(col, val)`      | Delete all rows where `col` equals `val`. Leaves holes for speed.                     | Write     |\n| `DeleteBy(filters)`     | Delete rows matching every `(col → val)`. Panics if filter is nil or empty.           | Write     |\n| `Get(col, val)`         | Get one arbitrary row where `col` equals `val`.                                       | Read      |\n| `GetAll(col, val)`      | Get all rows where `col` equals `val`.                                                | Read      |\n| `QueryBy(filters)`      | Find all rows matching every `(col → val)`. Skips holes. Panics if filters nil/empty. | Read      |\n| `QueryByHoles(filters)` | Same as `QueryBy` but includes holes.                                                 | Read      |\n| `All()`                 | Return all rows, skipping holes.                                                      | Read      |\n| `AllHoles()`            | Return all rows including holes.                                                      | Read      |\n| `Compact()`             | Physically remove holes to reclaim RAM, rebuilds the quaternary indices.              | Write     |\n| `Count(col, val)`       | Count number of times `val` appears in `col`.                                         | Read      |\n\n---\n\n## 🧹 Holes \u0026 Compaction\n\n* **What’s a “hole”?**\n  Deletions just nullify slots for speed. Rows with holes still take space.\n* **When to `Compact()`?**\n  After bulk inserts or optionally after heavy deletes. Frequent compactions may hurt performance.\n* **Do I have to handle holes?**\n  Use `QueryBy` and `All()` to skip holes. Use `QueryByHoles` and `AllHoles()` for raw physical view.\n\n---\n\n## ⚡️ Best Practices\n\n* 🗝️ Use a consistent schema: same column count per row.\n* ⚠️ Never pass nil or empty filters to `QueryBy` or `DeleteBy` — they will panic!\n* 🧹 Run `Compact()` wisely — it’s not automatic.\n* 🚀 You can store millions of rows easily, but monitor RAM if you use `InsertHoles` a lot.\n* 🐛 Note: `GetAll` may return holes in some versions. Use `QueryBy` if you need strict correctness.\n\n---\n\n## 📏 Limitations\n\n* No schema enforcement: you must keep row length consistent yourself.\n* No transactional batch operations.\n* No OR filter logic — `QueryBy` is always AND.\n* Panics on nil/empty filters — not error-safe by default.\n* It’s pure in-memory: no persistence, snapshot, or on-disk mode yet.\n* No mutex. Use mutex if threading, based on API call direction.\n\n---\n\n## 📚 Documentation\n\nFull API reference: [pkg.go.dev](https://pkg.go.dev/github.com/neurlang/table)\nIssues and improvements: [GitHub Issues](https://github.com/neurlang/table/issues)\n\n---\n\n## 🔑 License\n\nMIT — do anything you want. Attribution appreciated.\n\n---\n\n## 🙌 Contributing\n\nWe welcome improvements!\nFile an issue for bug reports, feature requests, or performance tuning ideas.\nLarge-scale fuzz tests, schema enforcement, and auto-compaction PRs are especially welcome.\n\n---\n\n## 🏁 Example Output\n\n```shell\n[[cup tasse taza] [cup verre copa] [cup coupe copa]]\n[[earth terre tierra] [land terre tierra]]\n[[cup verre copa] [cup coupe copa] [glass verre copa]]\n[[bank banque banco] [bench banc banco]]\n[[faucet robinet llave] [key clé llave]]\n[[cup tasse taza] [cup coupe copa]]\n```\n\n---\n\n## ❤️ Built for performance fanatics, by performance fanatics.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurlang%2Ftable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneurlang%2Ftable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurlang%2Ftable/lists"}