{"id":24396366,"url":"https://github.com/kevinrecuerda/documentstore","last_synced_at":"2025-10-10T18:07:47.819Z","repository":{"id":118004127,"uuid":"172738866","full_name":"KevinRecuerda/DocumentStore","owner":"KevinRecuerda","description":null,"archived":false,"fork":false,"pushed_at":"2020-03-31T08:23:54.000Z","size":232,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-01T07:57:45.721Z","etag":null,"topics":["docstore","marten"],"latest_commit_sha":null,"homepage":"","language":"C#","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/KevinRecuerda.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-26T15:32:53.000Z","updated_at":"2021-08-17T17:11:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"5378fc2f-0d69-4e7b-bdc1-8f3308601e08","html_url":"https://github.com/KevinRecuerda/DocumentStore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KevinRecuerda/DocumentStore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinRecuerda%2FDocumentStore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinRecuerda%2FDocumentStore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinRecuerda%2FDocumentStore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinRecuerda%2FDocumentStore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KevinRecuerda","download_url":"https://codeload.github.com/KevinRecuerda/DocumentStore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinRecuerda%2FDocumentStore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004908,"owners_count":26083802,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["docstore","marten"],"created_at":"2025-01-19T21:39:07.279Z","updated_at":"2025-10-10T18:07:47.800Z","avatar_url":"https://github.com/KevinRecuerda.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Document Store\n\nThis project is a sample for document store database, using:\n- Postgresql\n- [Marten](https://github.com/JasperFx/marten)\n\nit shows:\n- Sub class (`Issue`)\n- Sub array (`Assignee`)\n- Inheritance (`Smurf`)\n- Indexing sub array (`Mapping`)\n- Indexing text (`TextSearch`)\n\n\n***\n\n\n#### Postgresql\n- [Jsonb functions](https://www.postgresql.org/docs/9.5/functions-json.html)\n- [sub-array filter](https://stackoverflow.com/questions/22736742/query-for-array-elements-inside-json-type)\n- [Index types](https://www.citusdata.com/blog/2017/10/17/tour-of-postgres-index-types/)\n  - [gin index](https://www.postgresql.org/docs/9.4/datatype-json.html#JSON-INDEXING)\n  - [full text search index](https://www.postgresql.org/docs/9.5/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX)\n  - [similar text index](https://www.postgresql.org/docs/9.4/pgtrgm.html#AEN163078) ([functions](https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP))\n- [index usage](https://medium.com/@Alibaba_Cloud/principles-and-optimization-of-5-postgresql-indexes-btree-hash-gin-gist-and-brin-4d133e7f1842)\n\n\u003e need `pg_trgm` extension\n\n\n#### Marten\n- [Docs](http://jasperfx.github.io/marten/documentation/)\n- [Query](http://jasperfx.github.io/marten/documentation/documents/querying/linq/)\n- [Include](http://jasperfx.github.io/marten/documentation/documents/querying/include/)\n- [Inheritance](http://jasperfx.github.io/marten/documentation/documents/advanced/hierarchies/)\n\n##### Id generation\n- [marten identity](https://jasperfx.github.io/marten/documentation/documents/identity/)\n- [hi-lo algorithm](https://stackoverflow.com/questions/282099/whats-the-hi-lo-algorithm)\n- `int/long` vs `uuid/guid`\n  - [stackoverflow](https://dba.stackexchange.com/questions/264/guid-vs-int-which-is-better-as-a-primary-key)\n  - [usage](https://tomharrisonjr.com/uuid-or-guid-as-primary-keys-be-careful-7b2aa3dcb439) =\u003e Integers Internal, UUIDs External\n\n#### Migrations\n[Marten migration](http://jasperfx.github.io/marten/documentation/schema/migrations/)\n\n```sql\n-- rename column\nupdate example\nset js = js - 'old' || jsonb_build_object('new', js-\u003e'old')\nwhere js ? 'old'\n\n-- transform array\u003cT\u003e to T\nupdate example\nset js = jsonb_set(\n            js #- '{prefixPath,old}',\n            '{prefixPath,new}',\n            js #\u003e '{prefixPath,old,0}') -- take only first item\nwhere js ? '{prefixPath,old}'\n```\n\n\n#### Note\n- [`Include` with JoinType.LeftOuter and dictionary fails](https://github.com/JasperFx/marten/pull/1223)\n- [IsOneOf for array using include fails](https://github.com/JasperFx/marten/pull/1221)\n- [Containment where clauses](https://github.com/JasperFx/marten/issues/1345)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinrecuerda%2Fdocumentstore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinrecuerda%2Fdocumentstore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinrecuerda%2Fdocumentstore/lists"}