I vote cap gun. Looks like a circular part with a little nub sticking out where your roll of caps would go.
There were cap gun rifles that were pretty elaborate...if you had the money back then.
Oh wow! that definitely looks like an old spur trigger revolver! nice find!
Here's a comparison for you
Look closely at the remains of your trigger area, it's a good tell
I grew up with guns in south Texas, and did a lot of study on them when I was in high school and got to mess with and take apart/rebuild a lot of older guns.
The hollow handle is another tell, the old handgun grip plates attached to each other through the hollow of the handle.
From the size of it your probably right on it being 22 caliber, probably an old boot gun
If memory serves Colt first started making the percussion spur trigger shooters in the 1850's, and Remmington started making the "smoot" spur triggers in in 1860's or 70's, most of the spur trigger guns become known as suicide specials since the odds of it going off on yourself while you carried it were about as good as anything you were shooting at
Here's a shot of the old Colt's
The bend of the handle on yours looks pretty similar especially towards the bottom, comparing it to the colt shot, another good indicator of the older made shooters.
Maybe you'll luck out and find one intact, those babies sell for thousands
After thinking about what you said about digging out the bottom of a store, is it an old store? storeowners that didn't trust banks would use a basement to hide thier money in and keep a pistol handy in case of robbery, you could luck out and find a cache down there along with the shooter! I'll keep my fingers crossed