canonical / sqlair

Friendly type mapping for SQL databases
Apache License 2.0
16 stars 8 forks source link

Seperate cache operations from SQLair logic #126

Closed Aflynn50 closed 7 months ago

Aflynn50 commented 7 months ago

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.

Aflynn50 commented 7 months ago

Looks good, but which should we land first - #117, or this?

Merging this first is fine