touchlab-lab / knarch.db

K(otlin)N(ative)A(rchitecture) Database
https://touchlab.co/
Apache License 2.0
90 stars 9 forks source link

Review and possibly refactor the statement cache #18

Open kpgalligan opened 6 years ago

kpgalligan commented 6 years ago

The db connection uses a statement cache with logic similar to the original, but the way we're storing and routing things is pretty different. It seems pretty possible that there are error flows that will leave statements hanging out in the database, which will ultimately cause issues when trying to disconnect. This isn't a super high priority, because if you're getting exceptions while creating statements you have other issues, but still. See acquirePreparedStatement