Joan and Jim are having a conversation about how to write Go code that deals with database tables:
Jim: Maybe we can have a Store and just make methods like CreateUser, DeleteUser, CreateWidget, etc on it, without worrying about a User or Widget struct. CreateUser can accept userName, password, etc. as parameters, and each of these methods just runs the appropriate SQL.
Joan: Hm, might work initially but what happens when you need to select a list of users?
Home | About | Contact |