From 7c44914ecbfce8ef75705f73e1f67f08ccc48a86 Mon Sep 17 00:00:00 2001 From: Jimmy99 Date: Wed, 6 Apr 2016 08:04:54 +0200 Subject: [PATCH] Update 05.3.md typographical errors and improved readability --- en/05.3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/05.3.md b/en/05.3.md index b89fcc70..c59413c5 100644 --- a/en/05.3.md +++ b/en/05.3.md @@ -120,7 +120,7 @@ Also you have to do a `rows.Next()`, without using that you can't fetch data in Transactions =============== -The above example states how you fetch data from the database, but when you want to write a web application then it'll not only fetch data from the db but it'll also write data into it, for that, you use transactions because the database might get locked if you do not use transactions since there can be multiple go routines which access the database, and you do not want this happening to your web application. Also if you do not use transactions then a lot of things can go wrong with the web app. +The above example shows how you fetch data from the database, but when you want to write a web application then it will not only be necessary to fetch data from the db but it will also be required to write data into it. For that purpose, you should use transactions because for various reasons, such as having multiple go routines which access the database, the database might get locked. This is undesirable in your web application and the use of transactions is effective in ensuring your database activities either pass or fail completely depending on circumstances. It is clear that using transactions can prevent a lot of things from going wrong with the web app. trashSQL, err := database.Prepare("update task set is_deleted='Y',last_modified_at=datetime() where id=?") if err != nil {