7
7
{
8
8
present : "search_lastname" ,
9
9
text : "You should replace \"search_lastname\" with a placeholder (?)." ,
10
+ text_ja : "\"search_lastname\" をプレースホルダの (?) に置き換える必要があります。" ,
10
11
index : 0 ,
11
12
examples : [
12
13
[
@@ -17,12 +18,14 @@ info =
17
18
{
18
19
absent : String . raw `\?` ,
19
20
text : "Write an parameterized statement with the Special character \"?\" added." ,
21
+ text_ja : "特殊文字である \"?\" を使ってパラメータ化されたステートメントを書いてください。" ,
20
22
index : 0
21
23
} ,
22
24
{
23
25
present : String . raw `\+` ,
24
26
index : 0 ,
25
27
text : "There is no need for string concatenation. Use a simple constant string using the form \"...\"." ,
28
+ text_ja : "文字列連結は必要ありません。\"...\" の形で定数文字列を使ってください。" ,
26
29
examples : [
27
30
[
28
31
"String QueryString =\n \"select * from authors where lastname = \" + \"?\" + \" ; \";\n" ,
@@ -34,28 +37,33 @@ info =
34
37
absent : String . raw `\s* PreparedStatement\s+pstmt = connection \.
35
38
prepareStatement \( QueryString \) \; \s*` ,
36
39
text : "After defining the query string you should create a prepared statement, using the form `PreparedStatement pstmt = connection.prepareStatement(QueryString);`" ,
40
+ text_ja : "クエリ文字列を定義したあとに、`PreparedStatement pstmt = connection.prepareStatement(QueryString);` の形でプリペアドステートメントを作成する必要があります。" ,
37
41
} ,
38
42
{
39
43
absent : "search_lastname" ,
40
44
present : "lastname" ,
41
45
index : 1 ,
42
46
text : "The term `lastname` is the name of the database field to be searched, However, you want to search for a specific value in that field. That value is held in the variable `search_lastname`, not in `lastname`." ,
47
+ text_ja : "`lastname` は検索するデータベースのフィールド名です。このフィールドからある特定の値を検索したいはずです。その値は `lastname` ではなく `search_lastname` に格納されています。" ,
43
48
} ,
44
49
{
45
50
absent : String . raw `pstmt \. setString \( 1 , search_lastname \) \;` ,
46
51
index : 1 ,
47
52
text : "Start the second section with a statement like `pstmt.setString(1, search_lastname);`" ,
53
+ text_ja : "2つ目のセクションは `pstmt.setString(1, search_lastname);` で始めてください。" ,
48
54
} ,
49
55
{
50
56
absent : "executeQuery" ,
51
57
present : "execute" ,
52
58
index : 1 ,
53
59
text : "Use `executeQuery` not `execute` so we can receive and use a potential series of results (a `ResultSet`)." ,
60
+ text_ja : "`execute` ではなく `executeQuery` を使用してください。これで一連の結果(ResultSet)を得ることができます。" ,
54
61
} ,
55
62
{
56
63
absent : String . raw `\s* ResultSet\s+results = pstmt \. executeQuery \( \) \; \s*` ,
57
64
index : 1 ,
58
65
text : "After using `setString` execute the query and place the results in `results`, something like `ResultSet results = pstmt.executeQuery();`" ,
66
+ text_ja : "`setString` のあとでクエリを実行し、結果を `result` に格納してください。`ResultSet results = pstmt.executeQuery();` のような形になるはずです。" ,
59
67
} ,
60
68
] ,
61
69
expected : [
0 commit comments