Categories
Mastering Development

Facing issue querying google datastore

Here’s the part of the code var Ctx = context.Background() DSClient, err := datastore.NewClient(Ctx, PROJECT_ID) if err != nil { log.Fatal(“Couldn’t connect to DataStore: “, err) } log.Print(“DataStore Client: “, DSClient) q := datastore.NewQuery(“users”).Filter(“email=”, greq.Email).Limit(1) keys, err := config.DSClient.GetAll(config.Ctx, q, &urs) I’m getting following error. http: panic serving 127.0.0.1:60844: runtime error: invalid memory address or […]

Categories
Development

Type mismatch with projection on a []byte property

I have a struct as follows type MyEntity struct { PF []byte `json:”-” datastore:”_pf”` } Querying without a Projection works fine. However, when I query with projection on “_pf” field, I get “type mismatch: string versus []uint8” error. I implemented the PropertyLoadSaver and examined the prop.Value for “_pf” property and found that some rows return […]