{"id":22538390,"url":"https://github.com/shuttle/shuttle.recall.sql.storage","last_synced_at":"2025-03-28T06:43:34.451Z","repository":{"id":66349407,"uuid":"95702680","full_name":"Shuttle/Shuttle.Recall.Sql.Storage","owner":"Shuttle","description":"Event Store implementation backed by any Sql-based database.","archived":false,"fork":false,"pushed_at":"2025-01-25T07:15:53.000Z","size":240,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T07:28:52.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shuttle.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}},"created_at":"2017-06-28T19:07:37.000Z","updated_at":"2024-08-05T15:34:22.000Z","dependencies_parsed_at":"2024-03-16T18:33:56.778Z","dependency_job_id":"09991ba6-5755-454d-a453-facf61faf542","html_url":"https://github.com/Shuttle/Shuttle.Recall.Sql.Storage","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuttle%2FShuttle.Recall.Sql.Storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuttle%2FShuttle.Recall.Sql.Storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuttle%2FShuttle.Recall.Sql.Storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuttle%2FShuttle.Recall.Sql.Storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shuttle","download_url":"https://codeload.github.com/Shuttle/Shuttle.Recall.Sql.Storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245984556,"owners_count":20704794,"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-12-07T11:11:51.591Z","updated_at":"2025-03-28T06:43:34.444Z","avatar_url":"https://github.com/Shuttle.png","language":"C#","readme":"# Sql Server\r\n\r\n```\r\nPM\u003e Install-Package Shuttle.Recall.Sql.Storage\r\n```\r\n\r\nA Sql Server implementation of the `Shuttle.Recall` event sourcing `EventStore`.\r\n\r\n## Configuration\r\n\r\n```c#\r\nservices.AddSqlEventStorage();\r\n```\r\n\r\n## Database\r\n\r\nPlease reference the `Shuttle.Recall.EntityFrameworkCore.SqlServer.Storage` package and use the Entity Framework Core migration mechanism to create the event store database structures.\r\n\r\n## IKeyStore\r\n\r\nYou are bound to run into situations where you have a business or other key that is required to be unique.  Given that the `IEventStore` makes use of only surrogate keys the `IKeyStore` is used to create a unique list of keys associated with a given aggregate identifier.\r\n\r\nSince the keys used in the key store have to be unique you should ensure that they contain enough information to be unique and have the intended meaning.\r\n\r\nA key could be something such as `[order-number]:ord-001/2016`, `[customer-onboarding]:id-number=0000005555089`, or `[system-name/profile]:672cda1c-c3ec-4f81-a577-e64f9f14e141`.\r\n\r\n### Contains\r\n\r\n``` c#\r\nbool Contains(string key);\r\n```\r\n\r\nReturns `true` if the given `key` has an associated aggregate identifier.\r\n\r\n---\r\n``` c#\r\nbool Contains(Guid id);\r\n```\r\n\r\nReturns `true` if the given `id` is present in the key store.\r\n\r\n---\r\n### Get\r\n\r\n``` c#\r\nGuid? Get(string key);\r\n```\r\n\r\nReturns the `Guid` associated with the given key; else `null`.\r\n\r\n---\r\n### Remove\r\n\r\n``` c#\r\nvoid Remove(string key);\r\nvoid Remove(Guid id);\r\n```\r\n\r\nWhen specifying the `key` the assocation with the identifier will be removed.  When specifying the `id` all keys associated with the given `id` will be removed.\r\n\r\n---\r\n### Add\r\n\r\n``` c#\r\nvoid Add(Guid id, string key);\r\n```\r\n\r\nCreates an association between the `id` and the `key`.\r\n\r\n---\r\n### Add\r\n\r\n``` c#\r\nvoid Rekey(string key, string rekey);\r\n```\r\n\r\nChanges `key` to a new key specified by `rekey`.\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuttle%2Fshuttle.recall.sql.storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuttle%2Fshuttle.recall.sql.storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuttle%2Fshuttle.recall.sql.storage/lists"}