{"id":2682,"date":"2025-03-12T23:45:25","date_gmt":"2025-03-12T15:45:25","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=2682"},"modified":"2025-03-12T23:45:25","modified_gmt":"2025-03-12T15:45:25","slug":"postgresql-transaction%ef%bc%88%e4%ba%8b%e5%8a%a1%ef%bc%89%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2025\/03\/12\/postgresql-transaction%ef%bc%88%e4%ba%8b%e5%8a%a1%ef%bc%89%e8%af%a6%e8%a7%a3\/","title":{"rendered":"PostgreSQL TRANSACTION\uff08\u4e8b\u52a1\uff09\u8be6\u89e3"},"content":{"rendered":"\n<p>\u4e8b\u52a1\uff08Transaction\uff09\u662f\u4e00\u4e2a\u903b\u8f91\u4e0a\u7684\u5de5\u4f5c\u5355\u4f4d\uff0c\u901a\u5e38\u7531\u591a\u4e2a SQL \u8bed\u53e5\u7ec4\u6210\uff0c\u4e8b\u52a1\u786e\u4fdd\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u6240\u6709\u7684\u64cd\u4f5c\u8981\u4e48\u5168\u90e8\u6210\u529f\uff0c\u8981\u4e48\u5168\u90e8\u5931\u8d25\uff0c\u4fdd\u8bc1\u6570\u636e\u7684\u4e00\u81f4\u6027\u3002PostgreSQL \u63d0\u4f9b\u4e86\u5bf9\u4e8b\u52a1\u7684\u652f\u6301\uff0c\u786e\u4fdd\u5728\u9762\u5bf9\u5f02\u5e38\u548c\u9519\u8bef\u65f6\uff0c\u6570\u636e\u5e93\u7684\u5b8c\u6574\u6027\u4e0d\u88ab\u7834\u574f\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. \u4e8b\u52a1\u7684\u56db\u5927\u7279\u6027\uff1aACID<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>A &#8211; \u539f\u5b50\u6027\uff08Atomicity\uff09<\/strong>\uff1a\u4e8b\u52a1\u4e2d\u7684\u6240\u6709\u64cd\u4f5c\u8981\u4e48\u5168\u90e8\u6267\u884c\u6210\u529f\uff0c\u8981\u4e48\u5168\u90e8\u4e0d\u6267\u884c\uff0c\u4e0d\u4f1a\u5904\u4e8e\u90e8\u5206\u5b8c\u6210\u7684\u72b6\u6001\u3002<\/li>\n\n\n\n<li><strong>C &#8211; \u4e00\u81f4\u6027\uff08Consistency\uff09<\/strong>\uff1a\u4e8b\u52a1\u6267\u884c\u524d\u540e\uff0c\u6570\u636e\u5e93\u5fc5\u987b\u5904\u4e8e\u4e00\u81f4\u7684\u72b6\u6001\u3002\u4e8b\u52a1\u6267\u884c\u524d\u540e\u7684\u7ea6\u675f\u3001\u89c4\u5219\u3001\u89e6\u53d1\u5668\u7b49\u4e0d\u5e94\u88ab\u8fdd\u53cd\u3002<\/li>\n\n\n\n<li><strong>I &#8211; \u9694\u79bb\u6027\uff08Isolation\uff09<\/strong>\uff1a\u5e76\u53d1\u6267\u884c\u7684\u4e8b\u52a1\u5e94\u8be5\u76f8\u4e92\u9694\u79bb\uff0c\u4e00\u4e2a\u4e8b\u52a1\u7684\u6267\u884c\u4e0d\u5e94\u53d7\u5230\u5176\u4ed6\u4e8b\u52a1\u7684\u5e72\u6270\u3002<\/li>\n\n\n\n<li><strong>D &#8211; \u6301\u4e45\u6027\uff08Durability\uff09<\/strong>\uff1a\u4e00\u65e6\u4e8b\u52a1\u63d0\u4ea4\uff0c\u7ed3\u679c\u4f1a\u6c38\u4e45\u4fdd\u5b58\u5728\u6570\u636e\u5e93\u4e2d\uff0c\u5373\u4f7f\u7cfb\u7edf\u5d29\u6e83\u4e5f\u4e0d\u4e22\u5931\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. \u57fa\u672c\u4e8b\u52a1\u64cd\u4f5c<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.1 \u5f00\u59cb\u4e8b\u52a1<\/strong><\/h3>\n\n\n\n<p>\u4e8b\u52a1\u901a\u8fc7 <code>BEGIN<\/code> \u6216 <code>START TRANSACTION<\/code> \u547d\u4ee4\u5f00\u59cb\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>BEGIN;\n-- \u6216\u8005\nSTART TRANSACTION;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.2 \u63d0\u4ea4\u4e8b\u52a1<\/strong><\/h3>\n\n\n\n<p><code>COMMIT<\/code> \u7528\u4e8e\u63d0\u4ea4\u5f53\u524d\u4e8b\u52a1\uff0c\u4f7f\u4e8b\u52a1\u4e2d\u7684\u6240\u6709\u64cd\u4f5c\u6210\u4e3a\u6c38\u4e45\u6539\u53d8\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>COMMIT;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.3 \u56de\u6eda\u4e8b\u52a1<\/strong><\/h3>\n\n\n\n<p><code>ROLLBACK<\/code> \u7528\u4e8e\u64a4\u9500\u5f53\u524d\u4e8b\u52a1\u4e2d\u7684\u6240\u6709\u64cd\u4f5c\uff0c\u56de\u6eda\u540e\u4e8b\u52a1\u4e2d\u6240\u505a\u7684\u66f4\u6539\u4e0d\u4f1a\u88ab\u4fdd\u5b58\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ROLLBACK;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.4 \u81ea\u52a8\u63d0\u4ea4\uff08Autocommit\uff09<\/strong><\/h3>\n\n\n\n<p>PostgreSQL \u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5728\u6bcf\u6761 SQL \u8bed\u53e5\u6267\u884c\u540e\u81ea\u52a8\u63d0\u4ea4\uff0c\u5373\u6bcf\u6b21\u6267\u884c\u4e00\u4e2a SQL \u547d\u4ee4\u65f6\uff0c\u5b83\u4f1a\u88ab\u5f53\u4f5c\u4e00\u4e2a\u5355\u72ec\u7684\u4e8b\u52a1\u3002\u5982\u679c\u5e0c\u671b\u8fdb\u884c\u591a\u4e2a SQL \u64cd\u4f5c\u4f5c\u4e3a\u4e00\u4e2a\u4e8b\u52a1\u6267\u884c\uff0c\u9700\u8981\u663e\u5f0f\u4f7f\u7528 <code>BEGIN<\/code>\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. \u4e8b\u52a1\u9694\u79bb\u7ea7\u522b<\/strong><\/h2>\n\n\n\n<p>\u4e8b\u52a1\u7684\u9694\u79bb\u6027\u51b3\u5b9a\u4e86\u591a\u4e2a\u4e8b\u52a1\u5e76\u53d1\u6267\u884c\u65f6\uff0c\u5b83\u4eec\u76f8\u4e92\u4e4b\u95f4\u7684\u5e72\u6270\u7a0b\u5ea6\u3002PostgreSQL \u652f\u6301\u56db\u79cd\u6807\u51c6\u7684\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.1 READ UNCOMMITTED<\/strong><\/h3>\n\n\n\n<p>\u5141\u8bb8\u4e8b\u52a1\u8bfb\u53d6\u672a\u63d0\u4ea4\u7684\u6570\u636e\uff0c\u8fd9\u53ef\u80fd\u5bfc\u81f4\u201c\u810f\u8bfb\u201d\uff08Dirty Read\uff09\uff0c\u5373\u4e00\u4e2a\u4e8b\u52a1\u8bfb\u53d6\u53e6\u4e00\u4e2a\u4e8b\u52a1\u672a\u63d0\u4ea4\u7684\u6570\u636e\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u4e0d\u4e00\u81f4\u7684\u7ed3\u679c\u3002<\/p>\n\n\n\n<p><strong>PostgreSQL \u9ed8\u8ba4\u4f7f\u7528\u7684\u9694\u79bb\u7ea7\u522b\u662f <code>READ COMMITTED<\/code>\uff0c\u800c\u975e <code>READ UNCOMMITTED<\/code>\uff0c\u56e0\u4e3a <code>READ UNCOMMITTED<\/code> \u4e0d\u63d0\u4f9b\u826f\u597d\u7684\u6570\u636e\u4e00\u81f4\u6027\u4fdd\u8bc1\u3002<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.2 READ COMMITTED<\/strong><\/h3>\n\n\n\n<p>\u4e8b\u52a1\u53ea\u80fd\u8bfb\u53d6\u5df2\u63d0\u4ea4\u7684\u6570\u636e\u3002\u6bcf\u6b21\u67e5\u8be2\u64cd\u4f5c\u90fd\u4f1a\u770b\u5230\u6267\u884c\u524d\u5df2\u63d0\u4ea4\u7684\u6570\u636e\uff0c\u4f46\u67e5\u8be2\u8fc7\u7a0b\u4e2d\u7684\u6570\u636e\u53ef\u80fd\u4f1a\u88ab\u5176\u4ed6\u4e8b\u52a1\u4fee\u6539\uff0c\u9020\u6210\u201c\u4e0d\u53ef\u91cd\u590d\u8bfb\u201d\uff08Non-repeatable Read\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.3 REPEATABLE READ<\/strong><\/h3>\n\n\n\n<p>\u4e8b\u52a1\u5185\u7684\u6240\u6709\u67e5\u8be2\u5c06\u8fd4\u56de\u76f8\u540c\u7684\u7ed3\u679c\uff0c\u5373\u4f7f\u5176\u4ed6\u4e8b\u52a1\u4fee\u6539\u4e86\u6570\u636e\u3002\u907f\u514d\u4e86\u201c\u4e0d\u53ef\u91cd\u590d\u8bfb\u201d\u7684\u95ee\u9898\uff0c\u4f46\u53ef\u80fd\u4f1a\u53d1\u751f\u201c\u5e7b\u8bfb\u201d\uff08Phantom Read\uff09\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.4 SERIALIZABLE<\/strong><\/h3>\n\n\n\n<p>\u8fd9\u662f\u6700\u5f3a\u7684\u9694\u79bb\u7ea7\u522b\uff0c\u4e8b\u52a1\u6267\u884c\u65f6\uff0c\u76f8\u5f53\u4e8e\u8fd9\u4e9b\u4e8b\u52a1\u662f\u4e32\u884c\u6267\u884c\u7684\uff0c\u907f\u514d\u4e86\u201c\u810f\u8bfb\u201d\u3001\u201c\u4e0d\u53ef\u91cd\u590d\u8bfb\u201d\u548c\u201c\u5e7b\u8bfb\u201d\u3002\u5b83\u4fdd\u8bc1\u4e86\u6700\u9ad8\u7684\u6570\u636e\u4e00\u81f4\u6027\uff0c\u4f46\u4ee3\u4ef7\u8f83\u5927\uff0c\u6027\u80fd\u8f83\u4f4e\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.5 \u8bbe\u7f6e\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b<\/strong><\/h3>\n\n\n\n<p>\u53ef\u4ee5\u5728\u4e8b\u52a1\u5f00\u59cb\u65f6\u8bbe\u7f6e\u9694\u79bb\u7ea7\u522b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;\nBEGIN;\n-- \u6267\u884c\u4e8b\u52a1\u64cd\u4f5c\nCOMMIT;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. \u5e76\u53d1\u63a7\u5236<\/strong><\/h2>\n\n\n\n<p>PostgreSQL \u4f7f\u7528\u591a\u7248\u672c\u5e76\u53d1\u63a7\u5236\uff08MVCC\uff0cMulti-Version Concurrency Control\uff09\u6765\u5b9e\u73b0\u4e8b\u52a1\u7684\u9694\u79bb\u6027\uff0c\u786e\u4fdd\u591a\u4e2a\u4e8b\u52a1\u5e76\u53d1\u6267\u884c\u65f6\u80fd\u4fdd\u8bc1\u6570\u636e\u4e00\u81f4\u6027\u3002MVCC \u5141\u8bb8\u6bcf\u4e2a\u4e8b\u52a1\u6709\u81ea\u5df1\u7684\u6570\u636e\u7248\u672c\uff0c\u800c\u4e0d\u76f4\u63a5\u76f8\u4e92\u5e72\u6270\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.1 \u9501\u673a\u5236<\/strong><\/h3>\n\n\n\n<p>PostgreSQL \u4f1a\u5728\u4e8b\u52a1\u6267\u884c\u65f6\u5bf9\u6d89\u53ca\u7684\u6570\u636e\u52a0\u9501\uff0c\u786e\u4fdd\u6570\u636e\u7684\u6b63\u786e\u6027\u548c\u4e00\u81f4\u6027\u3002\u4e0d\u540c\u7684\u9501\u7ea7\u522b\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u884c\u7ea7\u9501<\/strong>\uff1a\u9501\u5b9a\u5355\u884c\u6570\u636e\uff0c\u5141\u8bb8\u5176\u4ed6\u4e8b\u52a1\u8bbf\u95ee\u5176\u4ed6\u884c\u3002<\/li>\n\n\n\n<li><strong>\u8868\u7ea7\u9501<\/strong>\uff1a\u9501\u5b9a\u6574\u4e2a\u8868\uff0c\u963b\u6b62\u5176\u4ed6\u4e8b\u52a1\u5bf9\u8868\u7684\u8bbf\u95ee\u3002<\/li>\n<\/ul>\n\n\n\n<p>PostgreSQL \u4f7f\u7528\u884c\u7ea7\u9501\u6765\u907f\u514d\u9501\u51b2\u7a81\uff0c\u8fd9\u6837\u53ef\u4ee5\u63d0\u9ad8\u5e76\u53d1\u6027\u80fd\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. \u793a\u4f8b\uff1a\u4e8b\u52a1\u64cd\u4f5c<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.1 \u793a\u4f8b 1\uff1a\u5f00\u59cb\u3001\u63d0\u4ea4\u3001\u56de\u6eda<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>-- \u5f00\u59cb\u4e8b\u52a1\nBEGIN;\n\n-- \u6267\u884c\u4e00\u4e9b\u64cd\u4f5c\nUPDATE employees SET salary = salary + 1000 WHERE department = 'HR';\n\n-- \u63d0\u4ea4\u4e8b\u52a1\nCOMMIT;\n\n-- \u6216\u8005\uff0c\u56de\u6eda\u4e8b\u52a1\n-- ROLLBACK;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.2 \u793a\u4f8b 2\uff1a\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\u8bbe\u7f6e<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>-- \u8bbe\u7f6e\u4e8b\u52a1\u9694\u79bb\u7ea7\u522b\u4e3a REPEATABLE READ\nSET TRANSACTION ISOLATION LEVEL REPEATABLE READ;\n\n-- \u5f00\u59cb\u4e8b\u52a1\nBEGIN;\n\n-- \u6267\u884c\u64cd\u4f5c\nSELECT * FROM employees WHERE department = 'HR';\n\n-- \u63d0\u4ea4\u4e8b\u52a1\nCOMMIT;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.3 \u793a\u4f8b 3\uff1a\u5e76\u53d1\u4e8b\u52a1\uff08\u6a21\u62df\u810f\u8bfb\uff09<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>-- \u4e8b\u52a1 1\nBEGIN;\nUPDATE employees SET salary = salary + 500 WHERE department = 'Engineering';\n\n-- \u4e8b\u52a1 2\uff08\u53ef\u80fd\u8bfb\u53d6\u672a\u63d0\u4ea4\u7684\u6570\u636e\uff0c\u4ea7\u751f\u810f\u8bfb\uff09\nBEGIN;\nSELECT * FROM employees WHERE department = 'Engineering';  -- \u810f\u8bfb\n\n-- \u63d0\u4ea4\u4e8b\u52a1 1\nCOMMIT;\n\n-- \u63d0\u4ea4\u4e8b\u52a1 2\nCOMMIT;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>6. \u4e8b\u52a1\u7ba1\u7406\u7684\u6ce8\u610f\u4e8b\u9879<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4e8b\u52a1\u7684\u4f7f\u7528\u5e94\u5c0f\u5fc3\uff0c\u907f\u514d\u957f\u65f6\u95f4\u9501\u5b9a\u8d44\u6e90<\/strong>\uff1a\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u4e8b\u52a1\u53ef\u80fd\u5bfc\u81f4\u5176\u4ed6\u4e8b\u52a1\u65e0\u6cd5\u6267\u884c\uff0c\u5f71\u54cd\u5e76\u53d1\u6027\u80fd\u3002<\/li>\n\n\n\n<li><strong>\u4fdd\u8bc1\u4e8b\u52a1\u5c3d\u53ef\u80fd\u7b80\u77ed<\/strong>\uff1a\u5c06\u4e8b\u52a1\u8303\u56f4\u9650\u5b9a\u5728\u5fc5\u8981\u7684\u64cd\u4f5c\u4e0a\uff0c\u51cf\u5c11\u9501\u5b9a\u7684\u65f6\u95f4\u3002<\/li>\n\n\n\n<li><strong>\u907f\u514d\u810f\u8bfb\u3001\u4e0d\u53ef\u91cd\u590d\u8bfb\u3001\u5e7b\u8bfb<\/strong>\uff1a\u6839\u636e\u4e1a\u52a1\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u9694\u79bb\u7ea7\u522b\uff0c\u5c3d\u91cf\u4fdd\u8bc1\u6570\u636e\u4e00\u81f4\u6027\u3002<\/li>\n\n\n\n<li><strong>\u56de\u6eda\u4e8b\u52a1\u65f6\u8981\u5c0f\u5fc3<\/strong>\uff1a\u907f\u514d\u5728\u4e0d\u5fc5\u8981\u65f6\u6267\u884c <code>ROLLBACK<\/code>\uff0c\u56e0\u4e3a\u5b83\u4f1a\u64a4\u9500\u6240\u6709\u5728\u4e8b\u52a1\u4e2d\u8fdb\u884c\u7684\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>7. \u4e8b\u52a1\u793a\u4f8b\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>-- \u5f00\u59cb\u4e8b\u52a1\nBEGIN;\n\n-- \u6267\u884c\u4e00\u4e9b\u6570\u636e\u5e93\u64cd\u4f5c\nUPDATE employees SET salary = salary + 1000 WHERE department = 'HR';\n\n-- \u63d0\u4ea4\u4e8b\u52a1\nCOMMIT;\n\n-- \u5982\u679c\u51fa\u9519\uff0c\u56de\u6eda\u4e8b\u52a1\n-- ROLLBACK;<\/code><\/pre>\n\n\n\n<p><strong>\u4e8b\u52a1\u63d0\u4f9b\u4e86\u5bf9\u6570\u636e\u5e93\u64cd\u4f5c\u7684\u5f3a\u5927\u63a7\u5236\u529b\uff0c\u5e2e\u52a9\u786e\u4fdd\u6570\u636e\u7684\u4e00\u81f4\u6027\u548c\u5b8c\u6574\u6027\u3002\u66f4\u591a\u8be6\u7ec6\u5185\u5bb9\u8bf7\u5173\u6ce8\u5176\u4ed6\u76f8\u5173\u6587\u7ae0\uff01<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e8b\u52a1\uff08Transaction\uff09\u662f\u4e00\u4e2a\u903b\u8f91\u4e0a\u7684\u5de5\u4f5c\u5355\u4f4d\uff0c\u901a\u5e38\u7531\u591a\u4e2a SQL \u8bed\u53e5\u7ec4\u6210\uff0c\u4e8b\u52a1\u786e\u4fdd\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u6240\u6709\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2683,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78],"tags":[],"class_list":["post-2682","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql"],"_links":{"self":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/2682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/comments?post=2682"}],"version-history":[{"count":1,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/2682\/revisions"}],"predecessor-version":[{"id":2684,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/2682\/revisions\/2684"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media\/2683"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=2682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=2682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=2682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}