How to implement a generic/reusable function for multiple tables - Drizzle Team