Move the cache to a separate file and move operations on it to functions. The cache remains in the sqlair rather than being moved to a separate package because it needs access to the types in sqlair to set finalizers on new instantiations of them.
The singleton pattern is used in newStmtCache to allow only a single copy of the cache to be created.
Move the cache to a separate file and move operations on it to functions. The cache remains in the
sqlair
rather than being moved to a separate package because it needs access to the types insqlair
to set finalizers on new instantiations of them.The singleton pattern is used in
newStmtCache
to allow only a single copy of the cache to be created.