{"id":18848578,"url":"https://github.com/crossworth/enthstore","last_synced_at":"2025-07-29T18:08:46.647Z","repository":{"id":57654864,"uuid":"455005305","full_name":"crossworth/enthstore","owner":"crossworth","description":"Postgres Hstore type for Ent","archived":false,"fork":false,"pushed_at":"2022-02-03T03:54:53.000Z","size":67,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-15T07:58:28.392Z","etag":null,"topics":["ent","gqlgen","graphql","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Go","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/crossworth.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":"2022-02-03T02:28:35.000Z","updated_at":"2024-05-09T09:48:31.000Z","dependencies_parsed_at":"2022-09-26T21:22:09.929Z","dependency_job_id":null,"html_url":"https://github.com/crossworth/enthstore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossworth%2Fenthstore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossworth%2Fenthstore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossworth%2Fenthstore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crossworth%2Fenthstore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crossworth","download_url":"https://codeload.github.com/crossworth/enthstore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231869544,"owners_count":18438591,"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":["ent","gqlgen","graphql","postgresql"],"created_at":"2024-11-08T03:13:04.648Z","updated_at":"2024-12-30T14:24:42.933Z","avatar_url":"https://github.com/crossworth.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Hstore type and predicates for Ent.\n\nThis package defines the [`Postgres hstore`](https://www.postgresql.org/docs/9/hstore.html) type\nto be used with [`ent`](https://github.com/ent/ent) and a few predicates.\n\n### Using the type:\n```go\nfunc (User) Fields() []ent.Field {\n\treturn []ent.Field{\n\t\tfield.Other(\"attributes\", enthstore.Hstore{}).\n\t\t\tSchemaType(enthstore.Hstore{}.SchemaType()).\n\t\t\tDefault(func() enthstore.Hstore {\n\t\t\t\treturn enthstore.Hstore{}\n\t\t\t}),\n\t}\n}\n```\n\n### Using the predicates:\n```go\nusers, err := client.User.Query().Where(func(selector *sql.Selector) {\n    selector.Where(enthstore.HasKey(user.FieldAttributes, \"a\"))\n}).All(context.Background)\n```\n\n#### List of predicates:\n- HasKey\n- HasAllKeys\n- ValueIsNull\n- ValueEQ\n- ValueNEQ\n- ValueGT\n- ValueGTE\n- ValueLT\n- ValueLTE\n- ValueContains\n- ValueHasPrefix\n- ValueHasSuffix\n\n### Using with [GQLGen](https://github.com/99designs/gqlgen):\n\nDefine a [custom scalar](https://gqlgen.com/reference/scalars/):\n```graphql\nscalar Hstore\n```\n\nAnd declare the type mapping on `gqlgen.yml`:\n\n```yaml\nmodels:\n  Hstore:\n    model: github.com/crossworth/enthstore.Hstore\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossworth%2Fenthstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrossworth%2Fenthstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrossworth%2Fenthstore/lists"}