func main() { var ( orm beedb.Model user *User ) user = new(User) orm = SetupDb() //START CODE OMIT orm.SetTable("users").Insert(map[string]interface{}{"id": 1, "first_name": "John", "last_name": "Doe", "age": 25}) PrintTable(orm) orm.Where(1).Find(user) user.FirstName = "James" orm.Save(user) PrintTable(orm) orm.Delete(user) PrintTable(orm) //END CODE OMIT }
func insertUser(orm *beedb.Model, user *UserInfo) { orm.Save(user) }