{"id":13508888,"url":"https://github.com/rodrigues/red","last_synced_at":"2025-10-21T15:35:00.146Z","repository":{"id":31943199,"uuid":"35512898","full_name":"rodrigues/red","owner":"rodrigues","description":null,"archived":true,"fork":false,"pushed_at":"2017-08-07T19:03:45.000Z","size":44,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T04:07:59.748Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/red","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rodrigues.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-12T21:11:14.000Z","updated_at":"2023-09-01T10:52:54.000Z","dependencies_parsed_at":"2022-08-24T10:30:35.836Z","dependency_job_id":null,"html_url":"https://github.com/rodrigues/red","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigues%2Fred","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigues%2Fred/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigues%2Fred/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodrigues%2Fred/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodrigues","download_url":"https://codeload.github.com/rodrigues/red/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314044,"owners_count":20757455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-01T02:01:00.013Z","updated_at":"2025-10-21T15:34:59.816Z","avatar_url":"https://github.com/rodrigues.png","language":"Elixir","funding_links":[],"categories":["ORM and Datamapping"],"sub_categories":[],"readme":"Red\n===\n\n[![Hex version](https://img.shields.io/hexpm/v/red.svg \"Hex version\")](https://hex.pm/packages/red)\n[![Build status](https://img.shields.io/travis/rodrigues/red.svg \"Build status\")](https://travis-ci.org/rodrigues/red)\n[![Deps Status](https://beta.hexfaktor.org/badge/all/github/rodrigues/red.svg)](https://beta.hexfaktor.org/github/rodrigues/red)\n[![Inline docs](http://inch-ci.org/github/rodrigues/red.svg?branch=master\u0026style=flat)](http://hexdocs.pm/red)\n![Hex downloads](https://img.shields.io/hexpm/dt/red.svg \"Hex downloads\")\n\nStore relations between entities using [redis](http://redis.io).\n\n## Example: A `follow` system\n\n```elixir\nimport Red\n\n# @vcr2 -{follow}-\u003e @hex_pm\n\n{:ok, _} =\n  \"@vcr2\"\n  |\u003e relation(:follow)\n  |\u003e add!(\"@hex_pm\")\n\n\"@vcr2\" |\u003e relation(:follow) |\u003e Enum.at(0)\n\u003e \"@hex_pm\"\n\n# @vcr2 ===follow===\u003e *\ncount_following = \"@vcr2\" |\u003e relation(:follow) |\u003e Enum.count\n\u003e 100\n\n# @vcr2 \u003c===follow=== *\ncount_followers = \"@vcr2\" |\u003e relation(:follow, :in) |\u003e Enum.count\n\u003e 43\n\n# jump 10, next 5\n\"@vcr2\" |\u003e relation(:follow) |\u003e offset(10) |\u003e limit(5) |\u003e Enum.to_list\n\u003e []\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigues%2Fred","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodrigues%2Fred","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodrigues%2Fred/lists"}