{"id":22963292,"url":"https://github.com/naasking/higherlogics.google.datastore","last_synced_at":"2026-05-16T22:03:05.418Z","repository":{"id":40927476,"uuid":"124551710","full_name":"naasking/HigherLogics.Google.Datastore","owner":"naasking","description":"POCO auto mapper for Google Datastore","archived":false,"fork":false,"pushed_at":"2022-12-07T17:33:54.000Z","size":107,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-24T04:42:58.878Z","etag":null,"topics":["dotnet","dotnet-core","google-cloud","google-datastore-entities","mapper","poco-auto-mapper"],"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/naasking.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":"2018-03-09T14:36:15.000Z","updated_at":"2019-08-15T10:07:58.000Z","dependencies_parsed_at":"2023-01-24T19:33:09.473Z","dependency_job_id":null,"html_url":"https://github.com/naasking/HigherLogics.Google.Datastore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/naasking/HigherLogics.Google.Datastore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naasking%2FHigherLogics.Google.Datastore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naasking%2FHigherLogics.Google.Datastore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naasking%2FHigherLogics.Google.Datastore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naasking%2FHigherLogics.Google.Datastore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naasking","download_url":"https://codeload.github.com/naasking/HigherLogics.Google.Datastore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naasking%2FHigherLogics.Google.Datastore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33120450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dotnet","dotnet-core","google-cloud","google-datastore-entities","mapper","poco-auto-mapper"],"created_at":"2024-12-14T19:34:08.127Z","updated_at":"2026-05-16T22:03:05.401Z","avatar_url":"https://github.com/naasking.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HigherLogics.Google.Datastore\n\nA convention-based Google Datastore entities to POCO auto mapper suitable\nfor small to medium sized projects:\n\n    using HigherLogics.Google.Datastore;\n\n    public class Foo\n    {\n        [Key]\n        public long Baz { get; set; }\n        public string Bar { get; set; }\n    }\n    ...\n    var db = new Google.Cloud.Datastore.V1.DatastoreDb(\"MyProject\");\n\tvar fooId = db.Insert(new Foo { Bar = \"Hello World!\" });\n\tvar foo = db.Lookup(fooId, new Foo());\n    // returns: { Baz : \u003csome long id\u003e, Bar : \"hello world!\" }\n\nIt uses the standard attributes in the `System.ComponentModel.DataAnnotations`\nnamespace to designate the entity keys.\n\n# Custom Value Conversions\n\nMapping should work for most built in CLR types, including all primitive\ntypes, arrays, dates and nested entities. You can specify any missing\nvalue conversions as follows:\n\n    Mapper.Convert(from: (Value v) =\u003e ...create T,\n                   to:   (T obj) =\u003e ...create Value);\n\n# Integration with Existing Data\n\nBy default the full type name is used as the entity kind. To support\nintegration with existing data sets, you can specify the kind to use\nfor a given type:\n\n    Mapper.Kind\u003cFoo\u003e(\"Books\");\n\n# Query Extensions\n\nYou can create a query using one of the following methods:\n\n    var query = new Query(Mapper.Kind\u003cT\u003e())\n\nOr:\n\n\tvar db = new Google.Cloud.Datastore.V1.DatastoreDb(\"MyProject\");\n\t...\n\tvar query = db.CreateQuery\u003cT\u003e();\n\nResult sets from datastore return a sequence of untyped entities which\nyou can easily convert to a typed sequence as follows:\n\n    var results = db.RunQuery(query)\n                    .Entities\u003cFoo\u003e();\n\n# Performance Optimizations\n\nBy default this library calls Activator.CreateInstance\u003cT\u003e() to construct all\nentity types but this is known to be very inefficient. For maximum\nperformance, I recommend that you override the default constructor for all\nof your entity types:\n\n    Mapper.Constructor\u003cFoo\u003e(() =\u003e new Foo());\n\nThis is because I wanted to support environments that don't permit code\ngeneration, and code generation is the only automatic way to efficiently\ninvoke constructors.\n\nHowever, the IEntityMapper interface can support an implementation that uses\nSystem.Reflection.Emit or LINQ expressions, so you can replace the default\nmapping backend as follows:\n\n    public class YourCustomMapper : IEntityMapper { ... }\n\n    Mapper.Default = new YourCustomMapper();\n\nI will probably add a LINQ expression tree mapper at some point in a separate\nassembly.\n\n# Limitations\n\n * associations to foreign entities must be designated by a property of type\n   Key as with the usual Datastore API, or the special FK\u003cT\u003e wrapper this library\n   provides, and they must be manually loaded, inserted, etc. Any nested\n   reference or value types will be saved as embedded entities. Supporting\n   proper FK relations starts needing ORM-like features, requiring session-level map\n   of keys to/from entities, transparent loading of associations and\n   collections, and other features that can drastically impact performance\n * only tuples and value tuples up to 4 arguments are supported out of the box,\n   as any more than that and you should create a class or struct\n\n# Future Work\n\n * LINQ query interface\n * add something like [EntityField(string name)] to permit customizing the\n   entity field names, which will make it easier to integrate with existing\n   data","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaasking%2Fhigherlogics.google.datastore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaasking%2Fhigherlogics.google.datastore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaasking%2Fhigherlogics.google.datastore/lists"}