convert SqlPillow to mixin

so that it can be used with python pillows