Skip to content

Instantly share code, notes, and snippets.

View BFalkner's full-sized avatar

Brennan Falkner BFalkner

View GitHub Profile

Notes

The original subs actually making a query with printing the query, so no real queries here either.

The 'transaction' from the original doesn't appear to do anything except close over the connection argument. I didn't implement any transactional functionality because the original didn't appear to have any.

It doesn't make sense to memoize the non-query stuff and always run the query which is going to be your slowest thing. It also doesn't make sense to memoize inserts which always need to run.

Output