pip-services3-go / pip-services3-postgres-go

Postresql components for Pip.Services in Golang
MIT License
0 stars 0 forks source link

GetOneRandom() panic when table empty #3

Closed antonio-alexander closed 3 years ago

antonio-alexander commented 3 years ago

(An assumption) when the count for a given table is empty, the call to rand.Int64n panics. See persistence/PostgresPersistence.go: line 785. I think it just needs a a quick exit since the table is empty.

levichevdmitry commented 3 years ago

Fixed in new release v1.2.6