diff --git a/sample/at/basic/main.go b/sample/at/basic/main.go index ca2ce4280..df974a069 100644 --- a/sample/at/basic/main.go +++ b/sample/at/basic/main.go @@ -45,16 +45,6 @@ func main() { <-make(chan struct{}) } -func selectData() { - var orderTbl OrderTbl - row := db.QueryRow("select id,user_id,commodity_code,count,money,descs from order_tbl where id = ? ", 1) - err := row.Scan(&orderTbl.id, &orderTbl.userID, &orderTbl.commodityCode, &orderTbl.count, &orderTbl.money, &orderTbl.descs) - if err != nil { - panic(err) - } - fmt.Println(orderTbl) -} - func updateData(ctx context.Context) error { sql := "update order_tbl set descs=? where id=?" ret, err := db.ExecContext(ctx, sql, fmt.Sprintf("NewDescs-%d", time.Now().UnixMilli()), 1) @@ -68,5 +58,5 @@ func updateData(ctx context.Context) error { return err } fmt.Printf("update success: %d.\n", rows) - return fmt.Errorf("test error") + return nil }