{"id":13508629,"url":"https://github.com/meh/exquisite","last_synced_at":"2025-04-09T16:19:44.123Z","repository":{"id":8109976,"uuid":"9525655","full_name":"meh/exquisite","owner":"meh","description":"LINQ-like match_spec generation for Elixir.","archived":false,"fork":false,"pushed_at":"2019-12-16T23:32:38.000Z","size":29,"stargazers_count":79,"open_issues_count":3,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T16:19:34.601Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/meh.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":"2013-04-18T15:54:19.000Z","updated_at":"2025-03-16T11:50:16.000Z","dependencies_parsed_at":"2022-09-24T13:00:58.750Z","dependency_job_id":null,"html_url":"https://github.com/meh/exquisite","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meh%2Fexquisite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meh%2Fexquisite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meh%2Fexquisite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meh%2Fexquisite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meh","download_url":"https://codeload.github.com/meh/exquisite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065281,"owners_count":21041872,"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:00:55.858Z","updated_at":"2025-04-09T16:19:44.099Z","avatar_url":"https://github.com/meh.png","language":"Elixir","funding_links":[],"categories":["Miscellaneous"],"sub_categories":[],"readme":"Exquisite match_specs for Elixir\n================================\nEver had to write a complex match_spec and ended up with a bunch of\nunintelligible code you hoped you would never have to work on ever again?\n\nThose times are gone! Say hello to Exquisite!\n\nWhat is this?\n-------------\nExquisite converts a LINQ-inspired query language into match_specs at compile\ntime so you can use them with mnesia, ets and dets.\n\nIt supports record reflection to access record fields directly in the query and\nallows complex data generation and compare.\n\nIt also has some helpers to select with matchspecs from tuples and list of\ntuples.\n\nExamples\n--------\n\n```elixir\nrequire Exquisite\n\ns = Exquisite.match URI.Info,\n      where:  host == \"google.com\",\n      select: path\n  \nr = Exquisite.run! s, [ URI.parse(\"http://google.com/derp\"),\n                        URI.parse(\"http://yahoo.com/herp\"),\n                        URI.parse(\"http://bing.com/durp\"),\n                        URI.parse(\"http://google.com/herp\") ]\n\nIO.inspect r # =\u003e [\"/derp\", \"/herp\"]\n```\n\n```elixir\nrequire Exquisite\n\ns = Exquisite.match { x, y, z },\n      where:  z \u003e 2 and y \u003c 3,\n      select: x\n\nr = Exquisite.run! s, [ { 1, 2, 3 },\n                        { 4, 5, 6 },\n                        { 7, 8, 9 } ]\n\nIO.inspect r # =\u003e [1]\n```\n\n```elixir\nrequire Exquisite\n\ns = Exquisite.match { uri in URI.Info, x in { a, b } },\n      where:  uri.path == nil,\n      select: { x.b, x.a }\n\nr = Exquisite.run! s, [ { URI.parse(\"http://google.com/derp\"), { 1, 2 } },\n                        { URI.parse(\"http://yahoo.com\"), { 2, 3 } },\n                        { URI.parse(\"http://bing.com/durp\"), { 4, 5 } },\n                        { URI.parse(\"http://google.com\"), { 6, 7 } } ]\n\nIO.inspect r # =\u003e [{3, 2}, {7, 6}]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeh%2Fexquisite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeh%2Fexquisite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeh%2Fexquisite/lists"}