{"id":378,"date":"2019-06-11T09:48:16","date_gmt":"2019-06-11T00:48:16","guid":{"rendered":"http:\/\/localhost:8000\/?p=378"},"modified":"2021-01-23T09:52:02","modified_gmt":"2021-01-23T00:52:02","slug":"slick-transaction-management","status":"publish","type":"post","link":"http:\/\/localhost:8000\/2019\/06\/slick-transaction-management.html","title":{"rendered":"slick\u306b\u304a\u3051\u308b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406"},"content":{"rendered":"
scala\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066slick<\/a>\u3092\u696d\u52d9\u3067\u4f7f\u3063\u3066\u307f\u3088\u3046\u3068\u8a66\u3057\u3066\u3044\u305f\u304c\u3001\u30c9\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306b\u5236\u9650\u304c\u3042\u308a\u3001\u6700\u7d42\u7684\u306b\u53d6\u308a\u3084\u3081\u308b\u3053\u3068\u306b\u3057\u305f\u3002\u8abf\u3079\u305f\u3053\u3068\u3001\u8a66\u3057\u305f\u3053\u3068\u3092\u5099\u5fd8\u9332\u7684\u306b\u6b8b\u3057\u3066\u304a\u3053\u3046\u3068\u601d\u3046\u3002<\/p>\n slick version : slick\u3067\u306f\u30af\u30a8\u30ea\u306b\u76f8\u5f53\u3059\u308b \u3053\u306e\u8fba\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306f\u4ee5\u4e0b\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u306e\u3053\u3068\u3002 \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u3068\u66f8\u3044\u305f\u304c\u3001\u3084\u308a\u305f\u3044\u3053\u3068\u306f\u5177\u4f53\u7684\u306b\u4ee5\u4e0b\u306e\uff12\u70b9\u3067\u3042\u308b<\/p>\n (A) \u8907\u6570\u306e\u30af\u30a8\u30ea\u3092\u4e00\u3064\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3067\u5b9f\u884c\u3057\u3001SQL\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u3089\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3059\u308b \u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u306f\u4ee5\u4e0b\u306e\u8a18\u8ff0\u304c\u3042\u308b\u3002 \u3053\u3053\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3053\u3068\u304c\u66f8\u3044\u3066\u3042\u308b\u3002<\/p>\n \u3069\u3046\u3084\u3089\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u307f\u308b\u9650\u308a\u3001\u3084\u308a\u305f\u3044\u3053\u3068(A)\u306f1.\u3067\u3001\u3084\u308a\u305f\u3044\u3053\u3068(B)\u306f2.\u3067\u5b9f\u73fe\u3067\u304d\u308b\u3088\u3046\u3060\u3002<\/p>\n \u7279\u306b\u5de5\u592b\u3057\u306a\u304f\u3066\u3082\u3001\u666e\u901a\u306b\u3084\u3063\u3066\u3044\u308c\u3070\u5b9f\u73fe\u3067\u304d\u308b\u3002 \u305f\u3060\u3057\u5236\u9650\u304c\u3042\u308b\u3002 \u4e8c\u3064\u76ee\u306f\u3001\u4f8b\u3048\u3070\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4e8c\u3064\u306e \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u307f\u308b\u9650\u308a\u3001 \u307e\u305a\u306f\u3053\u3093\u306a\u611f\u3058\u306e\u30b3\u30fc\u30c9\u3092\u8a66\u3057\u3066\u307f\u305f\u3002<\/p>\n \u3053\u308c\u3060\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3002<\/p>\n \u3069\u3046\u3084\u3089\u3001auto-commit\u3092false\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3088\u3046\u3060\u3002<\/p>\n \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u300cSlick\u3067\u5229\u7528\u51fa\u6765\u306a\u3044\u6a5f\u80fd\u3092\u4f7f\u3046\u305f\u3081\u306bJDBC\u306e\u30ec\u30d9\u30eb\u3092\u843d\u3068\u3059\u306b\u306f\u3001SimpleDBIO\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u7528\u3044\u308c\u3070\u826f\u3044\u300d\u3068\u66f8\u3044\u3066\u3042\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u3092\u8ffd\u52a0\u3057\u3066\u307f\u305f\u3002<\/p>\n \u7d50\u679c\u306f\u5168\u304f\u5909\u308f\u3089\u305a\u3002 \u4ed6\u306b\u3084\u308a\u65b9\u306f\u306a\u3044\u306e\u304b\u3068\u3001\u30b0\u30b0\u3063\u3066\u3044\u308b\u3068\u4ee5\u4e0b\u306e\u30b9\u30e9\u30a4\u30c9\u3092\u767a\u898b\u3057\u305f\u3002 \u3053\u308c\u3092\u53c2\u8003\u306b\u3001slick v3.3.0\u306b\u5b58\u5728\u3059\u308b\u95a2\u6570\u3092\u4f7f\u3063\u3066\u5b9f\u88c5\u3057\u3066\u307f\u305f\u3002<\/p>\n \u3053\u306e\u3084\u308a\u65b9\u3082\u30c0\u30e1\u3060\u3063\u305f\u3002\u666e\u901a\u306b\u30b3\u30df\u30c3\u30c8\u3055\u308c\u3066\u3057\u307e\u3046\u3002<\/p>\n \u7d50\u8ad6\u3001\u300c\u4e00\u3064\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u4e2d\u3067\u3001\u30af\u30a8\u30ea\u5b9f\u884c->\u696d\u52d9\u30ed\u30b8\u30c3\u30af->\u5834\u5408\u306b\u3088\u3063\u3066\u5168\u4f53\u3092\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u300d\u3068\u3044\u3046\u4ef6\u306f\u3001\u81ea\u5206\u306e\u8abf\u67fb\u80fd\u529b\u3067\u306f\u5b9f\u73fe\u3067\u304d\u306a\u304b\u3063\u305f\u3002<\/p>\n \u203b\u3069\u306a\u305f\u304b\u3084\u308a\u65b9\u304c\u5206\u304b\u308b\u65b9\u304c\u3044\u3089\u3063\u3057\u3083\u3063\u305f\u3089\u6559\u3048\u3066\u304f\u3060\u3055\u3044m( <\/em>)m<\/p>\n \u81ea\u5206\u304c\u8abf\u67fb\u3057\u305f\u7bc4\u56f2\u3067\u306f\u3042\u308b\u304c\u3001slick\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u3067\u3067\u304d\u308b\u3053\u3068\u306f\u3001\u4ee5\u4e0b\u306e(A)\u3060\u3051\u306e\u3088\u3046\u3060\u3002<\/p>\n (A) \u8907\u6570\u306e\u30af\u30a8\u30ea\u3092\u4e00\u3064\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3067\u5b9f\u884c\u3057\u3001SQL\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u3089\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3059\u308b \u4eca\u56de\u3001 \u3068\u306f\u3044\u3048\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u51e6\u7406\u9806\u3092\u304d\u3061\u3093\u3068\u8003\u3048\u3066\u5b9f\u88c5\u3059\u308c\u3070\u3001\u307b\u3068\u3093\u3069\u306e\u30b1\u30fc\u30b9\u3067\u5927\u4e08\u592b\u3060\u3068\u601d\u3046\u3002<\/p>\n SQL\u306e\u4e26\u5217\u51e6\u7406\u306a\u3069\u3067\u306f\u975e\u5e38\u306b\u6709\u76ca\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3060\u3068\u601d\u3046\u306e\u3067\u3001\u6b21\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u6539\u3081\u3066\u691c\u8a0e\u3057\u305f\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" scala\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066slick\u3092\u696d\u52d9\u3067\u4f7f\u3063\u3066\u307f\u3088\u3046\u3068\u8a66\u3057\u3066\u3044\u305f\u304c\u3001\u30c9\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306b\u5236\u9650\u304c\u3042\u308a\u3001\u6700\u7d42\u7684\u306b\u53d6\u308a\u3084\u3081\u308b\u3053\u3068\u306b\u3057\u305f\u3002\u8abf\u3079\u305f\u3053\u3068\u3001\u8a66\u3057\u305f\u3053\u3068\u3092\u5099\u5fd8\u9332\u7684\u306b\u6b8b\u3057\u3066\u304a\u3053\u3046\u3068\u601d\u3046\u3002 slick version : 3.3.0 slick\u306e\u57fa\u672c slick\u3067\u306f\u30af\u30a8\u30ea\u306b\u76f8\u5f53\u3059\u308bDBIOAction\u3068\u3044\u3046\u3082\u306e\u3092\u307e\u305a\u751f\u6210\u3059\u308b\u3002\u4ee5\u4e0b\u306e\u4f8b\u3060\u3068insert\u3084update\u304cDBIOAction\u306b\u5f53\u305f\u308b\u3002\u307e\u305f\u3001insert\u3068update\u3092\u5408\u308f\u305b\u305faction\u3082DBIOAction\u306b\u5f53\u305f\u308b\u3002 \u6b21\u306b\u3001db.run()\u3067\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u5b9f\u969b\u306bSQL\u304c\u5b9f\u884c\u3055\u308c\u308b\u3002 val insert = Hoge.map(h => (h.item1, h.item2)).++(Seq((11, 12), (21, 22)) val update = Hoge.filter(_.ite <\/span>Continue Reading<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[36],"tags":[],"_links":{"self":[{"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/posts\/378"}],"collection":[{"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/comments?post=378"}],"version-history":[{"count":1,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/posts\/378\/revisions"}],"predecessor-version":[{"id":379,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/posts\/378\/revisions\/379"}],"wp:attachment":[{"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/media?parent=378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/categories?post=378"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost:8000\/wp-json\/wp\/v2\/tags?post=378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}3.3.0<\/code><\/p>\n
slick\u306e\u57fa\u672c<\/h2>\n
DBIOAction<\/code>\u3068\u3044\u3046\u3082\u306e\u3092\u307e\u305a\u751f\u6210\u3059\u308b\u3002\u4ee5\u4e0b\u306e\u4f8b\u3060\u3068
insert<\/code>\u3084
update<\/code>\u304c
DBIOAction<\/code>\u306b\u5f53\u305f\u308b\u3002\u307e\u305f\u3001
insert<\/code>\u3068
update<\/code>\u3092\u5408\u308f\u305b\u305f
action<\/code>\u3082
DBIOAction<\/code>\u306b\u5f53\u305f\u308b\u3002
\n\u6b21\u306b\u3001db.run()<\/code>\u3067\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u5b9f\u969b\u306bSQL\u304c\u5b9f\u884c\u3055\u308c\u308b\u3002<\/p>\n
val insert = Hoge.map(h => (h.item1, h.item2)).++(Seq((11, 12), (21, 22))\nval update = Hoge.filter(_.item1 === 11).map(h => (h.item2)).update(99)\nval action = insert andThen update\n\nval future = db.run(action.transactionally)\nval result = Await.result(future, Duration.Inf)<\/code><\/pre>\n
\nhttp:\/\/krrrr38.github.io\/slick-doc-ja\/v3.0.out\/slick-doc-ja+3.0.html<\/a><\/p>\n\u3084\u308a\u305f\u3044\u3053\u3068<\/h2>\n
\n(B) \u4e00\u3064\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u4e2d\u3067\u3001\u30af\u30a8\u30ea\u5b9f\u884c->\u696d\u52d9\u30ed\u30b8\u30c3\u30af->\u7d50\u679c\u6b21\u7b2c\u3067\u5168\u4f53\u3092\u30ed\u30fc\u30eb\u30d0\u30c3\u30af<\/code>\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/p>\n
\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u7ba1\u7406\u306b\u95a2\u3059\u308b\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/h2>\n
\nhttp:\/\/slick.lightbend.com\/doc\/3.0.0\/dbio.html#transactions-and-pinned-sessions<\/a><\/p>\n\n
DBIOAction<\/code>\u306b
transactionally<\/code>\u3092\u3064\u3051\u308b\u3068\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u5bfe\u8c61\u306b\u306a\u308a\u3001SQL\u5b9f\u884c\u7d50\u679c\u306b\u57fa\u3065\u3044\u3066\u3001\u81ea\u52d5\u7684\u306b\u5168\u4f53\u304ccommit \/ rollback\u3055\u308c\u308b<\/li>\n
DBIOAction<\/code>\u306b
withPinnedSession<\/code>\u3092\u3064\u3051\u308b\u3068\u540c\u4e00\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u4f7f\u3044\u307e\u308f\u3057\u3066DB\u5916\u3067\u5f85\u3061\u5408\u308f\u305b\u3067\u304d\u308b<\/li>\n<\/ol>\n
(A) \u8907\u6570\u306e\u30af\u30a8\u30ea\u3092\u4e00\u3064\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3067\u5b9f\u884c\u3057\u3001SQL\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u3089\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3059\u308b<\/h2>\n
\n\u30dd\u30a4\u30f3\u30c8\u306ftransactionally<\/code>\u3092\u3064\u3051\u308b\u3068\u3053\u308d\u3050\u3089\u3044\u3002<\/p>\n
val insert = Hoge.map(h => (h.item1, h.item2)).++(Seq((11, 12), (21, 22))\nval update = Hoge.filter(_.item1 === 11).map(h => (h.item2)).update(99)\nval action = insert andThen update\n\nAwait.result(db.run(action.transactionally), Duration.inf)<\/code><\/pre>\n
\n\u4e00\u3064\u76ee\u306f\u3001\u4e0a\u8a18\u306e\u4f8b\u3060\u3068\u3001insert\u3068update\u306e\u9593\u306bDB\u306b\u30af\u30a8\u30ea\u3092\u6295\u3052\u308b\u4ee5\u5916\u306e\u5225\u306e\u696d\u52d9\u30ed\u30b8\u30c3\u30af\u306e\u5b9f\u884c\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u3053\u3068\u3060\u3002<\/p>\nDBIOAction<\/code>\u3092\u305d\u308c\u305e\u308c\u5225\u3005\u306b\u5b9f\u884c\u3059\u308b\u3068\u3001\u3053\u308c\u3089\u306f\u5225\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u3060\u3002\u306a\u306e\u3067insert\u306f\u6210\u529f\u3057\u3066update\u304c\u30a8\u30e9\u30fc\u306b\u306a\u3063\u305f\u3068\u3059\u308b\u3068\u3001insert\u306e\u65b9\u306fcommit\u3055\u308c\u3066\u3057\u307e\u3046\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u4e00\u9023\u306e\u30af\u30a8\u30ea\u306f\u4e00\u3064\u306e
DBIOAction<\/code>\u306b\u307e\u3068\u3081\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n
val insert = Hoge.map(h => (h.item1, h.item2)).++(Seq((11, 12), (21, 22))\nAwait.result(db.run(insert.transactionally), Duration.inf)\n\nval update = Hoge.filter(_.item1 === 11).map(h => (h.item2)).update(99)\nAwait.result(db.run(update.transactionally), Duration.inf)<\/code><\/pre>\n
(B) \u4e00\u3064\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u4e2d\u3067\u3001\u30af\u30a8\u30ea\u5b9f\u884c->\u696d\u52d9\u30ed\u30b8\u30c3\u30af->\u5834\u5408\u306b\u3088\u3063\u3066\u5168\u4f53\u3092\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/h2>\n
withPinnedSession\u3092\u4f7f\u3046\u65b9\u6cd5<\/h3>\n
withPinnedSession<\/code>\u3092\u4f7f\u3048\u3070\u5b9f\u73fe\u3067\u304d\u305d\u3046\u3067\u3042\u308b\u3002 <\/p>\n
val insert = Hoge.map(h => (h.item1, h.item2)).++(Seq((11, 12), (21, 22)).withPinnedSession\nAwait.result(db.run(insert), Duration.Inf)\n\n\/\/ \u696d\u52d9\u30ed\u30b8\u30c3\u30af\u3092\u5b9f\u884c\u3002\u305d\u306e\u7d50\u679c\u30a8\u30e9\u30fc\u306b\u306a\u3063\u305f\u3068\u3044\u3046\u611f\u3058\nval error = true\n\nif (error) {\n val rollback = SimpleDBIO(_.connection.rollback()).withPinnedSession\n Await.result(db.run(rollback), Duration.Inf)\n}<\/code><\/pre>\n
autoCommit\u6709\u52b9\u6642\u306b\u3001\u660e\u793a\u7684\u306a\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u306f\u3067\u304d\u307e\u305b\u3093\u3002\norg.postgresql.util.PSQLException: autoCommit\u6709\u52b9\u6642\u306b\u3001\u660e\u793a\u7684\u306a\u30ed\u30fc\u30eb\u30d0\u30c3\u30af\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/code><\/pre>\n
val autoCommitFalse = SimpleDBIO(_.connection.setAutoCommit(false)).withPinnedSession\nAwait.result(db.run(autoCommitFalse), Duration.Inf)<\/code><\/pre>\n
\n\u3069\u3046\u3084\u3089\u3001withPinnedSession<\/code>\u3092\u3064\u3051\u3066\u3044\u308b\u306b\u3082\u95a2\u308f\u3089\u305a\u3001\u5225\u306e
DBIOAction<\/code>\u3060\u3068\u5225\u30bb\u30c3\u30b7\u30e7\u30f3\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u539f\u56e0\u306e\u3088\u3046\u3060\u304c\u3001\u8272\u3005\u3068\u8a66\u3057\u3066\u307f\u305f\u3082\u306e\u306e\u7d50\u5c40\u89e3\u6c7a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u304b\u3063\u305f\u3002\uff08\u3053\u306e\u65b9\u5411\u306f\u65ad\u5ff5\uff09<\/p>\n
startInTransaction\u3092\u4f7f\u3046\u3084\u308a\u65b9<\/h3>\n
\n<\/p>\nval session = db.createSession().asInstanceOf[BaseSession]\nsession.conn.setAutoCommit(false)\nsession.startInTransaction\n\n\/\/ insert\nval insert = Hoge.map(h => (h.item1, h.item2)).++(Seq((11, 12), (21, 22)).transactionally\nAwait.result(db.run(insert), Duration.Inf)\n\nsession.conn.rollback()\n\/\/ session.endInTransaction(session.conn.rollback()) \/\/ \u3053\u306e\u66f8\u304d\u65b9\u3082\u30c0\u30e1\nsession.close()<\/code><\/pre>\n
\u7d50\u8ad6<\/h2>\n
\n(B) \u4e00\u3064\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306e\u4e2d\u3067\u3001\u30af\u30a8\u30ea\u5b9f\u884c->\u696d\u52d9\u30ed\u30b8\u30c3\u30af->\u7d50\u679c\u6b21\u7b2c\u3067\u5168\u4f53\u3092\u30ed\u30fc\u30eb\u30d0\u30c3\u30af<\/code>\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/p>\n
insert->\u696d\u52d9\u30ed\u30b8\u30c3\u30af->insert<\/code>\u306e\u3088\u3046\u306a\u8981\u4ef6\u304c\u3082\u3057\u304b\u3057\u305f\u3089\u767a\u751f\u3057\u3046\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306a\u306e\u3067\u3001slick\u306e\u63a1\u7528\u306f\u898b\u9001\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n
\n
DBIOAction<\/code>\u306b\u307e\u3068\u3081\u3066\u3001
transactionally<\/code>\u3067\u5b9f\u884c\u3059\u308b\n
\n