[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"academy-blogs-en-1-1-all-js2go-ep45-transaction-acid-go-vs-javascript-en-all--*":3,"academy-blog-translations-9jnytcr0hvauwo4":85},{"data":4,"page":84,"perPage":84,"totalItems":84,"totalPages":84},[5],{"alt":6,"collectionId":7,"collectionName":8,"content":9,"cover_image":10,"cover_image_path":11,"created":12,"created_by":13,"expand":14,"id":79,"keywords":80,"locale":54,"published_at":81,"scheduled_at":13,"school_blog":76,"short_description":82,"status":74,"title":6,"updated":83,"updated_by":13,"slug":77,"views":78},"JS2GO EP.45 Transaction Management and ACID in Go vs JavaScript","sclblg987654321","school_blog_translations","\u003Cp>A transaction is a group of operations that must all succeed together or fail together.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>They are essential for any system that requires 100% data accuracy, such as:\u003C\u002Fp>\u003Cul>\u003Cli>Deducting balance + writing transaction logs + updating stock\u003C\u002Fli>\u003Cli>Transferring money between accounts\u003C\u002Fli>\u003Cli>Moving data from “Order” → “Shipment”\u003C\u002Fli>\u003Cli>Updating several tables in one workflow\u003C\u002Fli>\u003C\u002Ful>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>If any single operation fails, the system must ROLLBACK everything otherwise the data becomes inconsistent, causing serious long-term issues.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>In this episode, you will learn:\u003C\u002Fp>\u003Cp>✔ ACID Properties\u003Cbr>✔ How to handle Deadlocks\u003Cbr>✔ Go Transaction Patterns (pgx + GORM)\u003Cbr>✔ Node.js Transaction Patterns (pg + PostgreSQL)\u003Cbr>✔ SQL Transactions vs Business Transactions\u003Cbr>✔ Production Best Practices\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>⭐ 1) ACID Properties The Foundation of Reliable Systems\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>ACID represents the 4 essential guarantees of any safe and consistent transaction.\u003C\u002Fp>\u003Cfigure class=\"table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Property\u003C\u002Fth>\u003Cth>Meaning\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>Atomicity\u003C\u002Ftd>\u003Ctd>All operations succeed or none do\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Consistency\u003C\u002Ftd>\u003Ctd>Data remains valid and follows constraints after commit\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Isolation\u003C\u002Ftd>\u003Ctd>Transactions should not interfere with one another\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Durability\u003C\u002Ftd>\u003Ctd>Once committed, data is permanently stored\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Ffigure>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch3>💡 Example: Transfer 1,000 THB\u003C\u002Fh3>\u003Col>\u003Cli>Deduct from Account A\u003C\u002Fli>\u003Cli>Add to Account B\u003C\u002Fli>\u003Cli>Write log\u003C\u002Fli>\u003C\u002Fol>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>If step #2 fails → rollback everything. This is why ACID is critical for finance, e-commerce, logistics, and enterprise systems.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>⭐ 2) Universal SQL Transaction Flow\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>Works with PostgreSQL and MySQL:\u003C\u002Fp>\u003Cpre>\u003Ccode class=\"language-plaintext language-sql\">BEGIN;\n-- operations\nCOMMIT;\n-- or\nROLLBACK;\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>Simple but extremely powerful.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>⭐ 3) Isolation Levels The Most Overlooked Setting\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>SQL defines 4 isolation levels:\u003C\u002Fp>\u003Cfigure class=\"table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Level\u003C\u002Fth>\u003Cth>Prevents\u003C\u002Fth>\u003Cth>Notes\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>Read Uncommitted\u003C\u002Ftd>\u003Ctd>—\u003C\u002Ftd>\u003Ctd>Rarely used\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Read Committed\u003C\u002Ftd>\u003Ctd>Dirty Reads\u003C\u002Ftd>\u003Ctd>Default in PostgreSQL\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Repeatable Read\u003C\u002Ftd>\u003Ctd>Non-repeatable Reads\u003C\u002Ftd>\u003Ctd>Safer, more strict\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Serializable\u003C\u002Ftd>\u003Ctd>Phantom Reads\u003C\u002Ftd>\u003Ctd>Safest but more deadlocks\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Ffigure>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>PostgreSQL’s default (READ COMMITTED) works for 90% of production workloads.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>⭐ 4) What Is a Deadlock?\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>A deadlock happens when two transactions wait for each other forever.\u003C\u002Fp>\u003Cfigure class=\"table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>T1\u003C\u002Fth>\u003Cth>T2\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>Locks Row A\u003C\u002Ftd>\u003Ctd>&nbsp;\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>&nbsp;\u003C\u002Ftd>\u003Ctd>Locks Row B\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Tries to lock Row B → waits\u003C\u002Ftd>\u003Ctd>&nbsp;\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>&nbsp;\u003C\u002Ftd>\u003Ctd>Tries to lock Row A → waits\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Ffigure>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>Both transactions freeze.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch3>✔ How to fix deadlocks:\u003C\u002Fh3>\u003Cul>\u003Cli>Detect error code &amp; retry\u003C\u002Fli>\u003Cli>Apply consistent lock ordering\u003C\u002Fli>\u003Cli>Use \u003Ccode inline=\"\">SELECT ... FOR UPDATE\u003C\u002Fcode> carefully\u003C\u002Fli>\u003Cli>Set statement timeout\u003C\u002Fli>\u003C\u002Ful>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>⭐ 5) SQL Transaction vs Business Transaction\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch3>SQL Transaction\u003C\u002Fh3>\u003Cp>Happens within one database:\u003C\u002Fp>\u003Cul>\u003Cli>Money transfer\u003C\u002Fli>\u003Cli>Update multiple fields\u003C\u002Fli>\u003Cli>CRUD operations\u003C\u002Fli>\u003Cli>Stock reservation\u003C\u002Fli>\u003C\u002Ful>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch3>Business Transaction\u003C\u002Fh3>\u003Cp>Involves multiple services, e.g.:\u003C\u002Fp>\u003Cul>\u003Cli>Payment\u003C\u002Fli>\u003Cli>Inventory\u003C\u002Fli>\u003Cli>Shipping\u003C\u002Fli>\u003Cli>Email \u002F Notification\u003C\u002Fli>\u003C\u002Ful>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>This requires advanced patterns:\u003C\u002Fp>\u003Cp>✔ Saga Pattern\u003Cbr>✔ Outbox Pattern\u003Cbr>✔ Event-driven architecture\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>In EP.45 we focus mainly on SQL transactions.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>⭐ 6) Transactions in Go (pgx)\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>\u003Ccode inline=\"\">pgx\u003C\u002Fcode> is the fastest and most production-ready PostgreSQL driver for Go.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch3>🔹 Basic Transaction (pgx)\u003C\u002Fh3>\u003Cpre>\u003Ccode class=\"language-plaintext language-go\">tx, err := DB.Begin(ctx)\nif err != nil {\n    return err\n}\ndefer tx.Rollback(ctx)\n\n_, err = tx.Exec(ctx, \"UPDATE users SET ...\")\nif err != nil {\n    return err\n}\n\nreturn tx.Commit(ctx)\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch3>🔹 Full Transaction with Deadlock Retry (Recommended)\u003C\u002Fh3>\u003Cpre>\u003Ccode class=\"language-plaintext language-go\">func Transfer(ctx context.Context, from, to string, amount int) error {\n    for retry := 0; retry &lt; 3; retry++ {\n\n        tx, err := DB.Begin(ctx)\n        if err != nil {\n            return err\n        }\n        defer tx.Rollback(ctx)\n\n        \u002F\u002F Step 1: Deduct\n        _, err = tx.Exec(ctx,\n            \"UPDATE accounts SET balance = balance - $1 WHERE id=$2\",\n            amount, from,\n        )\n        if err != nil {\n            continue \u002F\u002F Retry on deadlock\n        }\n\n        \u002F\u002F Step 2: Add\n        _, err = tx.Exec(ctx,\n            \"UPDATE accounts SET balance = balance + $1 WHERE id=$2\",\n            amount, to,\n        )\n        if err != nil {\n            continue\n        }\n\n        if err := tx.Commit(ctx); err == nil {\n            return nil\n        }\n    }\n    return errors.New(\"transaction failed after retries\")\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>This is the gold standard for mission-critical systems.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>⭐ 7) Transactions in Go (GORM)\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>GORM makes transactions extremely easy:\u003C\u002Fp>\u003Cpre>\u003Ccode class=\"language-plaintext language-go\">func Transfer(db *gorm.DB, from, to string, amount int) error {\n    return db.Transaction(func(tx *gorm.DB) error {\n\n        if err := tx.Model(&amp;Account{}).\n            Where(\"id = ?\", from).\n            Update(\"balance\", gorm.Expr(\"balance - ?\", amount)).Error; err != nil {\n            return err\n        }\n\n        if err := tx.Model(&amp;Account{}).\n            Where(\"id = ?\", to).\n            Update(\"balance\", gorm.Expr(\"balance + ?\", amount)).Error; err != nil {\n            return err\n        }\n\n        return nil\n    })\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>GORM automatically handles commit\u002Frollback.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>⭐ 8) Transactions in Node.js (pg)\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch3>🔹 Basic Transaction\u003C\u002Fh3>\u003Cpre>\u003Ccode class=\"language-plaintext language-js\">const client = await pool.connect();\n\ntry {\n  await client.query(\"BEGIN\");\n\n  await client.query(\n    \"UPDATE accounts SET balance = balance - $1 WHERE id=$2\",\n    [1000, \"A\"]\n  );\n\n  await client.query(\n    \"UPDATE accounts SET balance = balance + $1 WHERE id=$2\",\n    [1000, \"B\"]\n  );\n\n  await client.query(\"COMMIT\");\n} catch (err) {\n  await client.query(\"ROLLBACK\");\n  throw err;\n} finally {\n  client.release();\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch3>🔹 Transaction with Deadlock Retry (Recommended)\u003C\u002Fh3>\u003Cpre>\u003Ccode class=\"language-plaintext language-js\">async function transfer(from, to, amount) {\n  for (let attempt = 0; attempt &lt; 3; attempt++) {\n    const client = await pool.connect();\n    try {\n      await client.query(\"BEGIN\");\n\n      await client.query(\n        \"UPDATE accounts SET balance = balance - $1 WHERE id=$2\",\n        [amount, from]\n      );\n\n      await client.query(\n        \"UPDATE accounts SET balance = balance + $1 WHERE id=$2\",\n        [amount, to]\n      );\n\n      await client.query(\"COMMIT\");\n      return;\n    } catch (err) {\n      await client.query(\"ROLLBACK\");\n\n      if (err.code === \"40P01\") continue; \u002F\u002F Deadlock\n      throw err;\n    } finally {\n      client.release();\n    }\n  }\n  throw new Error(\"transaction failed after retries\");\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>Equivalent to Go’s retry pattern.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>⭐ 9) Transaction Scopes\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cfigure class=\"table\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Scope\u003C\u002Fth>\u003Cth>When to Use\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>Single Query\u003C\u002Ftd>\u003Ctd>No transaction needed\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Simple multi-step logic\u003C\u002Ftd>\u003Ctd>Use SQL transaction\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Complex domain logic\u003C\u002Ftd>\u003Ctd>Encapsulate in a service function\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Distributed workflow\u003C\u002Ftd>\u003Ctd>Use Saga \u002F Outbox\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Ffigure>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>⭐ 10) Production Best Practices\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>✔ Set statement timeout — prevent long-running locks\u003Cbr>✔ Detect &amp; retry deadlocks (error code \u003Ccode inline=\"\">40P01\u003C\u002Fcode>)\u003Cbr>✔ Keep transactions short-lived\u003Cbr>✔ Log commit\u002Frollback\u003Cbr>✔ Implement idempotency for retryable operations\u003Cbr>✔ Avoid unnecessary \u003Ccode inline=\"\">SELECT FOR UPDATE\u003C\u002Fcode>\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Chr>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2>📌 Summary\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>Transactions protect your system from inconsistent data and catastrophic errors.\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp>In this episode, you learned:\u003C\u002Fp>\u003Cp>✔ ACID &amp; Isolation Levels\u003Cbr>✔ Deadlock Detection &amp; Retry\u003Cbr>✔ Go (pgx\u002FGORM) Transaction Patterns\u003Cbr>✔ Node.js (pg) Transaction Patterns\u003Cbr>✔ Production Best Practices\u003C\u002Fp>\u003Cp>&nbsp;\u003C\u002Fp>\u003Ch2 data-start=\"136\" data-end=\"205\">🔵 EP.46 Middleware &amp; Modular Architecture in Go and Node.js\u003C\u002Fh2>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cp data-start=\"207\" data-end=\"354\">In the next episode, we will explore how to build backend systems that are clean, maintainable, and production-ready using both Go and Node.js.\u003C\u002Fp>\u003Cp data-start=\"207\" data-end=\"354\">&nbsp;\u003C\u002Fp>\u003Cul>\u003Cli>Middleware Fundamentals\u003C\u002Fli>\u003Cli>Service \u002F Repository Pattern\u003C\u002Fli>\u003Cli>Production-Ready Project Structure\u003C\u002Fli>\u003C\u002Ful>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cdiv class=\"raw-html-embed\">\u003Cdiv style=\"margin:0 0 6px 0; font-weight:700;\">Read more:\u003C\u002Fdiv>\n\u003Cul style=\"list-style:none; padding:0; margin:0; line-height:1.4;\">\n  \u003Cli style=\"margin:0;\">\u003Ca href=\"\u002Fen\u002Fblogs\u002Fcategories\u002FGolang\" title=\"Golang The Series\">Golang The Series\u003C\u002Fa>\u003C\u002Fli>\n  \u003Cli style=\"margin:0;\">\u003Ca href=\"\u002Fen\u002Fblogs\u002Fcategories\u002FJS2GO\" title=\"JS2GO\">JS2GO\u003C\u002Fa>\u003C\u002Fli>\n  \u003Cli style=\"margin:0;\">\u003Ca href=\"\u002Fen\u002Fblogs\u002Fcategories\u002FTailwind%20CSS\" title=\"Tailwind CSS\">Tailwind CSS\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\u003C\u002Fdiv>\u003Cp>&nbsp;\u003C\u002Fp>\u003Cdiv class=\"raw-html-embed\">\n  \u003Cp style=\"margin:0 0 6px 0;\">\u003Cstrong>Follow Us:\u003C\u002Fstrong>\u003C\u002Fp>\n  \u003Cul style=\"list-style:none; padding:0; margin:0; line-height: 0.4;\">\n    \u003Cli style=\"display:flex; align-items:center; gap:6px; margin:0;\">\n      \n      \u003Csvg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"#1877F2\" aria-hidden=\"true\">\n        \u003Cpath d=\"M22 12.07C22 6.48 17.52 2 11.93 2S2 6.48 2 12.07c0 5 3.66 9.14 8.44 9.93v-7.02H7.9v-2.91h2.54V9.41c0-2.5 1.49-3.88 3.77-3.88 1.09 0 2.24.2 2.24.2v2.46h-1.26c-1.24 0-1.63.77-1.63 1.56v1.87h2.78l-.44 2.91h-2.34V22c4.78-.79 8.44-4.93 8.44-9.93Z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Ca href=\"https:\u002F\u002Fwww.facebook.com\u002Fsuperdev.academy.th\" target=\"_blank\" rel=\"noopener\" title=\"Follow Superdev Academy on Facebook\">Facebook: Superdev Academy\u003C\u002Fa>\n    \u003C\u002Fli>\n\n    \u003Cli style=\"display:flex; align-items:center; gap:6px; margin:0;\">\n      \n      \u003Csvg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"#FF0000\" aria-hidden=\"true\">\n        \u003Cpath d=\"M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.5 12 3.5 12 3.5s-7.5 0-9.4.6A3 3 0 0 0 .5 6.2 31.5 31.5 0 0 0 0 12a31.5 31.5 0 0 0 .5 5.8 3 3 0 0 0 2.1 2.1c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2.1A31.5 31.5 0 0 0 24 12a31.5 31.5 0 0 0-.5-5.8ZM9.75 15.02V8.98L15.5 12l-5.75 3.02Z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Ca href=\"https:\u002F\u002Fwww.youtube.com\u002F@SuperdevAcademy\" target=\"_blank\" rel=\"noopener\" title=\"Watch on YouTube\">YouTube: Superdev Academy\u003C\u002Fa>\n    \u003C\u002Fli>\n\n    \u003Cli style=\"display:flex; align-items:center; gap:6px; margin:0;\">\n      \n      \u003Csvg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"#E4405F\" aria-hidden=\"true\">\n        \u003Cpath d=\"M7 2h10a5 5 0 0 1 5 5v10a5 5 0 0 1-5 5H7a5 5 0 0 1-5-5V7a5 5 0 0 1 5-5Zm10 2H7a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3Zm-5 3.5A5.5 5.5 0 1 1 6.5 13 5.5 5.5 0 0 1 12 7.5Zm0 2A3.5 3.5 0 1 0 15.5 13 3.5 3.5 0 0 0 12 9.5Zm5.75-2.75a1.25 1.25 0 1 1-1.25 1.25 1.25 1.25 0 0 1 1.25-1.25Z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Ca href=\"https:\u002F\u002Fwww.instagram.com\u002Fsuperdevacademy\u002F?hl=en target=\" _blank\"=\"\" rel=\"noopener\" title=\"See behind-the-scenes on Instagram\">Instagram: Superdev Academy\u003C\u002Fa>\n    \u003C\u002Fli>\n\n    \u003Cli style=\"display:flex; align-items:center; gap:6px; margin:0;\">\n      \n      \u003Csvg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"#000000\" aria-hidden=\"true\">\n        \u003Cpath d=\"M21 8.12a6.86 6.86 0 0 1-4.8-2V16a6 6 0 1 1-6-6 5.9 5.9 0 0 1 1.63.23V8.05a9.08 9.08 0 0 1-1.63-.15V4.5a6.86 6.86 0 0 0 4.8 2.05V6.5a6.86 6.86 0 0 0 4.8 1.62ZM9.2 12.5A3.5 3.5 0 1 0 12.7 16V9.94a6 6 0 0 1-1.63-.27v3.95a3.5 3.5 0 0 1-1.87 3.17 3.5 3.5 0 0 1-4.78-3.23 3.5 3.5 0 0 1 4.78-3.06Z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Ca href=\"https:\u002F\u002Fwww.tiktok.com\u002F@superdevacademy\" target=\"_blank\" rel=\"noopener\" title=\"Watch short tips on TikTok\">TikTok: @superdevacademy\u003C\u002Fa>\n    \u003C\u002Fli>\n\n    \u003Cli style=\"display:flex; align-items:center; gap:6px; margin:0;\">\n      \n      \u003Csvg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"#111827\" aria-hidden=\"true\">\n        \u003Cpath d=\"M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2Zm6.93 6h-3.26a15.6 15.6 0 0 0-1.39-3.62A8.03 8.03 0 0 1 18.93 8ZM12 4c.73.93 1.7 2.74 2.2 4H9.8C10.3 6.74 11.27 4.93 12 4ZM8.72 4.38A15.6 15.6 0 0 0 7.32 8H4.07a8.03 8.03 0 0 1 4.65-3.62ZM4.07 16h3.25a15.6 15.6 0 0 0 1.4 3.62A8.03 8.03 0 0 1 4.07 16ZM12 20c-.73-.93-1.7-2.74-2.2-4h4.4C13.7 17.26 12.73 19.07 12 20Zm3.28-.38A15.6 15.6 0 0 0 16.68 16h3.25a8.03 8.03 0 0 1-4.65 3.62ZM20 14h-3.54a13.8 13.8 0 0 1-.26-4H20a7.98 7.98 0 0 1 0 4Zm-12.2 0H4a7.98 7.98 0 0 1 0-4h3.54a13.8 13.8 0 0 1-.26 4Zm2 .5h4.4a17.8 17.8 0 0 1-.72-4.5c0-1.58.25-3.1.72-4.5H9.8a17.8 17.8 0 0 1 .72 4.5c0 1.58-.25 3.1-.72 4.5Z\">\u003C\u002Fpath>\n      \u003C\u002Fsvg>\n      \u003Ca href=\"https:\u002F\u002Fwww.superdevacademy.com\u002F\" target=\"_blank\" rel=\"noopener\" title=\"Visit the official website of Superdev Academy\">Official Website: Superdev Academy.com\u003C\u002Fa>\n    \u003C\u002Fli>\n  \u003C\u002Ful>\n\u003C\u002Fdiv>\u003Cp>&nbsp;\u003C\u002Fp>","cover_image_js2_go_ep_ec6lauzbdq.GoandJavaScript.webp","https:\u002F\u002Ftwsme-r2.tumwebsme.com\u002Fsclblg987654321\u002Fx60iotab0jqcpuv\u002Fcover_image_js2_go_ep_ec6lauzbdq.GoandJavaScript.webp","2026-03-04 08:45:08.065Z","",{"keywords":15,"locale":48,"school_blog":58},[16,23,28,33,38,43],{"collectionId":17,"collectionName":18,"created":19,"created_by":13,"id":20,"name":21,"updated":22,"updated_by":13},"sclkey987654321","school_keywords","2026-03-04 08:45:07.399Z","72jmv19z0d4abka","Transactions","2026-04-10 16:12:54.403Z",{"collectionId":17,"collectionName":18,"created":24,"created_by":13,"id":25,"name":26,"updated":27,"updated_by":13},"2026-03-04 08:20:42.484Z","vslzz9nvv6n77cx","JavaScript","2026-04-10 16:07:28.339Z",{"collectionId":17,"collectionName":18,"created":29,"created_by":13,"id":30,"name":31,"updated":32,"updated_by":13},"2026-03-04 08:45:07.600Z","k7yaeiuxv1skqiy","ACID","2026-04-10 16:12:54.568Z",{"collectionId":17,"collectionName":18,"created":34,"created_by":13,"id":35,"name":36,"updated":37,"updated_by":13},"2026-03-04 08:20:14.253Z","ah6lvy4x8qe08l5","Golang","2026-04-10 16:07:26.172Z",{"collectionId":17,"collectionName":18,"created":39,"created_by":13,"id":40,"name":41,"updated":42,"updated_by":13},"2026-03-04 08:20:11.547Z","ey3puyme01a9bsw","Go","2026-04-10 16:07:25.893Z",{"collectionId":17,"collectionName":18,"created":44,"created_by":13,"id":45,"name":46,"updated":47,"updated_by":13},"2026-03-04 08:24:40.405Z","05u3tysava2z6ga","Node.js","2026-04-10 16:07:29.504Z",{"code":49,"collectionId":50,"collectionName":51,"created":52,"flag":53,"id":54,"is_default":55,"label":56,"updated":57},"en","pbc_1989393366","locales","2026-01-22 11:00:02.726Z","twemoji:flag-united-states","qv9c1llfov2d88z",false,"English","2026-04-10 15:42:46.825Z",{"category":59,"collectionId":60,"collectionName":61,"created":13,"expand":62,"id":76,"slug":77,"updated":13,"views":78},"hsa1afr8fcnd6qb","pbc_2105096300","school_blogs",{"category":63},{"blogIds":64,"collectionId":65,"collectionName":66,"created":67,"created_by":13,"id":59,"image":68,"image_alt":13,"image_path":69,"label":70,"name":71,"priority":72,"publish_at":73,"scheduled_at":13,"status":74,"updated":75,"updated_by":13},[],"sclcatblg987654321","school_category_blogs","2026-03-04 08:24:37.986Z","js2_go_2_11zon_y6paxmuz32.webp","https:\u002F\u002Ftwsme-r2.tumwebsme.com\u002Fsclcatblg987654321\u002Fhsa1afr8fcnd6qb\u002Fjs2_go_2_11zon_y6paxmuz32.webp",{"en":71,"th":71},"JS2GO",10,"2025-08-11 03:41:08.820Z","published","2026-04-25 02:32:14.339Z","9jnytcr0hvauwo4","js2go-ep45-transaction-acid-go-vs-javascript-en",206,"x60iotab0jqcpuv",[20,25,30,35,40,45],"2025-12-08 07:52:17.469Z","A complete guide to SQL transactions, ACID properties, deadlock handling, isolation levels, and production-ready transaction patterns in Go (pgx\u002FGORM) and Node.js (pg).","2026-05-08 06:52:03.969Z",1,{"th":77,"en":77}]