improve getSnippetAmountObj for types in db