@@ -119,10 +119,10 @@ msgid ""
119
119
"basic :mod:`!sqlite3` functionality. It assumes a fundamental understanding "
120
120
"of database concepts, including `cursors`_ and `transactions`_."
121
121
msgstr ""
122
- "このチュートリアルでは、基本的な :mod:`!sqlite3` 機能を使用して、例としてモ "
123
- "ンティ ・パイソンの映画のデータベースを作成します。カーソル(`cursors`_)やトラ "
124
- "ンザクション(` transactions`_)を含むデータベースの概念の基本を理解していること "
125
- "を前提としています 。"
122
+ "このチュートリアルでは、あなたは基本的な :mod:`!sqlite3` 機能を使用して、例 "
123
+ "としてモンティ ・パイソンの映画のデータベースを作成します。あなたがカーソル "
124
+ "(`cursors`_)やトランザクション(` transactions`_)を含むデータベースの基本概念を "
125
+ "理解していることを前提としています 。"
126
126
127
127
#: ../../library/sqlite3.rst:73
128
128
msgid ""
@@ -148,7 +148,7 @@ msgid ""
148
148
msgstr ""
149
149
"SQL 文を実行し、SQL クエリから結果を取得するには、データベース・カーソルを使"
150
150
"用する必要があります。 :meth:`con.cursor() <Connection.cursor>` を呼び出し"
151
- "て :class:`Cursor`を作成します :"
151
+ "て :class:`Cursor`を作成してください :"
152
152
153
153
#: ../../library/sqlite3.rst:95
154
154
msgid ""
@@ -159,6 +159,12 @@ msgid ""
159
159
"types is optional. Execute the ``CREATE TABLE`` statement by calling :meth:"
160
160
"`cur.execute(...) <Cursor.execute>`:"
161
161
msgstr ""
162
+ "さて、今やデータベース接続とカーソルを取得したので、タイトル(title)とリリース"
163
+ "年(year)と、レビュー・スコア(score)の列(columns)を持つデータベース・テーブル "
164
+ "``movie`` を作成できます。 簡単にするために、テーブル宣言では列名だけを使用で"
165
+ "きます。SQLite の 柔軟な型付け(`flexible typing`_)機能のおかげで、データ型の"
166
+ "指定はオプションになっています。 :meth:`cur.execute(...) <Cursor.execute>` を"
167
+ "呼び出して ``CREATE TABLE`` 文を実行してください:"
162
168
163
169
#: ../../library/sqlite3.rst:111
164
170
msgid ""
@@ -169,20 +175,32 @@ msgid ""
169
175
"execute>`, assign the result to ``res``, and call :meth:`res.fetchone() "
170
176
"<Cursor.fetchone>` to fetch the resulting row:"
171
177
msgstr ""
178
+ "SQLite に組み込みの ``sqlite_master`` テーブルに対してクエリを実行すること"
179
+ "で、新しいテーブルが作成されたことを確認できます。このテーブルには、 "
180
+ "``movie`` テーブル定義のエントリが含まれているはずです(詳細は `The Schema "
181
+ "Table`_ 参照)。 :meth:`cur.execute(...) <Cursor.execute>` を呼び出してクエリ"
182
+ "を実行して、その結果を ``res`` に代入し、結果の行(row)を取得するために :meth:"
183
+ "`res.fetchone() <Cursor.fetchone>` を呼び出します:"
172
184
173
185
#: ../../library/sqlite3.rst:125
174
186
msgid ""
175
187
"We can see that the table has been created, as the query returns a :class:"
176
188
"`tuple` containing the table's name. If we query ``sqlite_master`` for a non-"
177
189
"existent table ``spam``, :meth:`!res.fetchone()` will return ``None``:"
178
190
msgstr ""
191
+ "クエリがテーブルの名前を含む :class:`タプル <tuple>` を返すので、テーブルが作"
192
+ "成されたことがわかります。 存在しないテーブル ``spam`` に対して "
193
+ "``sqlite_master`` をクエリすると、 :meth:`!res.fetchone()` は ``None`` を返し"
194
+ "ます:"
179
195
180
196
#: ../../library/sqlite3.rst:136
181
197
msgid ""
182
198
"Now, add two rows of data supplied as SQL literals by executing an "
183
199
"``INSERT`` statement, once again by calling :meth:`cur.execute(...) <Cursor."
184
200
"execute>`:"
185
201
msgstr ""
202
+ "ここで、 INSERT 文を実行して SQL のリテラルとして提供された 2 行のデータを追"
203
+ "加し、 再度 :meth:`cur.execute(...) <Cursor.execute>` を呼び出して追加します:"
186
204
187
205
#: ../../library/sqlite3.rst:148
188
206
msgid ""
@@ -191,6 +209,11 @@ msgid ""
191
209
"controlling-transactions` for details). Call :meth:`con.commit() <Connection."
192
210
"commit>` on the connection object to commit the transaction:"
193
211
msgstr ""
212
+ "``INSERT`` 文は、変更がデータベースに保存される前にコミットする必要がある、ト"
213
+ "ランザクションを暗黙的に開きます(詳細は、 :ref:`sqlite3-controlling-"
214
+ "transactions` 参照)。 トランザクションをコミットするために接続オブジェクト"
215
+ "(connection object)の :meth:`con.commit() <Connection.commit>` を呼び出して下"
216
+ "さい:"
194
217
195
218
#: ../../library/sqlite3.rst:158
196
219
msgid ""
@@ -199,18 +222,26 @@ msgid ""
199
222
"assign the result to ``res``, and call :meth:`res.fetchall() <Cursor."
200
223
"fetchall>` to return all resulting rows:"
201
224
msgstr ""
225
+ "``SELECT`` クエリを実行することで、データが正しく挿入されたことを確認できま"
226
+ "す。 結果のすべての行を返すには、おなじみの :meth:`cur.execute(...) <Cursor."
227
+ "execute>` を使用して結果を ``res`` に代入し、 :meth:`res.fetchall() <Cursor."
228
+ "fetchall>` を呼び出して下さい:"
202
229
203
230
#: ../../library/sqlite3.rst:170
204
231
msgid ""
205
232
"The result is a :class:`list` of two :class:`!tuple`\\ s, one per row, each "
206
233
"containing that row's ``score`` value."
207
234
msgstr ""
235
+ "結果は、2 つの :class:`タプル <!tuple>` の :class:`リスト <list>` で、 それぞ"
236
+ "れのタプルにその行の ``score`` 値が含まれています。"
208
237
209
238
#: ../../library/sqlite3.rst:173
210
239
msgid ""
211
240
"Now, insert three more rows by calling :meth:`cur.executemany(...) <Cursor."
212
241
"executemany>`:"
213
242
msgstr ""
243
+ "ここで、 :meth:`cur.executemany(...) <Cursor.executemany>` を呼び出して、さら"
244
+ "に 3 行挿入します:"
214
245
215
246
#: ../../library/sqlite3.rst:186
216
247
msgid ""
@@ -219,31 +250,47 @@ msgid ""
219
250
"to bind Python values to SQL statements, to avoid `SQL injection attacks`_ "
220
251
"(see :ref:`sqlite3-placeholders` for more details)."
221
252
msgstr ""
253
+ "``data`` をクエリに結び付け(bind)するために ``?`` プレースホルダが使用されて"
254
+ "いることに注意してください。 SQL インジェクション攻撃(`SQL injection "
255
+ "attacks`_)を避けるために、Python の値を SQL 文に結び付けするには、常に :ref:`"
256
+ "文字列フォーマット <tut-formatting>` の代わりにプレースホルダを使用してくださ"
257
+ "い(詳細は :ref:`sqlite3-placeholders` 参照)。"
222
258
223
259
#: ../../library/sqlite3.rst:192
224
260
msgid ""
225
261
"We can verify that the new rows were inserted by executing a ``SELECT`` "
226
262
"query, this time iterating over the results of the query:"
227
263
msgstr ""
264
+ "``SELECT`` クエリを実行することで、新しい行が挿入されたことを確認できます。今"
265
+ "回は、クエリの結果を反復処理します:"
228
266
229
267
#: ../../library/sqlite3.rst:206
230
268
msgid ""
231
269
"Each row is a two-item :class:`tuple` of ``(year, title)``, matching the "
232
270
"columns selected in the query."
233
271
msgstr ""
272
+ "各行(row)は :class:`タプル <tuple>` の ``(year, title)`` の 2 つの項目であ"
273
+ "り、クエリで選択された列(columns)にマッチします。"
234
274
235
275
#: ../../library/sqlite3.rst:209
236
276
msgid ""
237
277
"Finally, verify that the database has been written to disk by calling :meth:"
238
278
"`con.close() <Connection.close>` to close the existing connection, opening a "
239
279
"new one, creating a new cursor, then querying the database:"
240
280
msgstr ""
281
+ "最後に、 :meth:`con.close() <Connection.close>` を呼び出して既存の接続"
282
+ "(connection)を閉じ、新しい接続を開き、新しいカーソルを作成してから、データ"
283
+ "ベースに対してクエリを実行して、データベースがディスクに書き込まれたことを確"
284
+ "認します:"
241
285
242
286
#: ../../library/sqlite3.rst:224
243
287
msgid ""
244
288
"You've now created an SQLite database using the :mod:`!sqlite3` module, "
245
289
"inserted data and retrieved values from it in multiple ways."
246
290
msgstr ""
291
+ "これで、あなたは、 :mod:`!sqlite3` モジュールを使用して SQLite データベースを"
292
+ "作成し、複数の方法でデータを挿入し、そこから値を取得することができるようにな"
293
+ "りました。"
247
294
248
295
#: ../../library/sqlite3.rst:236
249
296
msgid ":ref:`sqlite3-howtos` for further reading:"
@@ -284,7 +331,7 @@ msgstr ""
284
331
285
332
#: ../../library/sqlite3.rst:264
286
333
msgid "Open a connection to an SQLite database."
287
- msgstr ""
334
+ msgstr "SQLite データベースとの接続(connection)を開きます。 "
288
335
289
336
#: ../../library/sqlite3.rst:0
290
337
msgid "Parameters"
@@ -1716,13 +1763,15 @@ msgstr "説明"
1716
1763
1717
1764
#: ../../library/sqlite3.rst:1948
1718
1765
msgid "Transaction control"
1719
- msgstr ""
1766
+ msgstr "トランザクション制御 "
1720
1767
1721
1768
#: ../../library/sqlite3.rst:1950
1722
1769
msgid ""
1723
1770
"The :mod:`!sqlite3` module does not adhere to the transaction handling "
1724
1771
"recommended by :pep:`249`."
1725
1772
msgstr ""
1773
+ ":mod:`!sqlite3` モジュールは、 :pep:`249` で推奨されているトランザクション処"
1774
+ "理に準拠していません。"
1726
1775
1727
1776
#: ../../library/sqlite3.rst:1953
1728
1777
msgid ""