File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
docs/3-web-servers/08-database Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -190,16 +190,7 @@ Node.jsからPrismaを利用してデータベースのデータを操作する
190190- [ ` PrismaClient#[テーブル名].findFirst ` メソッド] ( https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#findfirst ) : 条件を満たす最初のレコードを取得
191191- [ ` PrismaClient#[テーブル名].findUnique ` メソッド] ( https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#findunique ) : レコードを一意に識別できる条件を使用してレコードを1つだけ取得
192192
193- :::tip[ 非同期処理]
194-
195- 上記の3つのメソッドは、<Term >** 非同期処理** </Term >を行います。JavaScriptにおける非同期処理とは、ファイルの入出力やネットワーク通信など、JavaScriptの外側の時間のかかる処理の完了を待つ間、ほかの処理を実行できるようにする仕組みです。非同期処理を行う関数を使用するためには、次の2つを行います。
196-
197- - 非同期処理を行う関数を呼び出す関数を定義する際、` async ` キーワードをつけること
198- - 非同期処理を行う関数の戻り値に対し、` await ` 演算子を適用すること
199-
200- 非同期処理に関する詳細は、[ MDNの記事] ( https://developer.mozilla.org/ja/docs/Learn/JavaScript/Asynchronous ) を参照してください。
201-
202- :::
193+ これら3つのメソッドは、<Term >非同期処理</Term >を行います。
203194
204195まずは、` findMany ` メソッドの戻り値を、デバッガを用いて確認してみましょう。
205196
Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ export default {
414414 name : "非同期処理" ,
415415 definition :
416416 "処理を実行する際、その完了を待たずに呼び出し元の処理が続行されるような処理。JavaScriptでは、asyncキーワードをつけた関数は非同期処理を行うための関数となり、内部ではawaitキーワードにより他の非同期処理を呼び出してその結果を待機できるようになる。" ,
417- referencePage : "/docs/web-servers/database /" ,
417+ referencePage : "/docs/web-servers/fetch-api /" ,
418418 } ,
419419 thread : {
420420 name : "スレッド" ,
You can’t perform that action at this time.
0 commit comments