update sqlite readerwriter to use yield