programming-idioms
programming-idioms copied to clipboard
Datastore safe Id gen
Current new id generation is poor :
datastore.NewQuery("Idiom").Order("-Id").Limit(1)
...
newID := maxIdiom.Id + 1
Replace it with correct, thread-safe id increment (or arbitrary id allocation). Same applies for a new Idiom and for a new Impl.