sqlite/visu: move handling for empty items to sqlite