@@ -2545,13 +2545,13 @@ msgid ""
2545
2545
"iterate over it directly using only a single call on the :class:`Connection` "
2546
2546
"object."
2547
2547
msgstr ""
2548
- ":class:`Connection` クラスのメソッド :meth:`~Connection.execute`, :meth:"
2549
- "`~Connection.executemany`, :meth:`~Connection.executescript` を使うことで、 "
2550
- "(しばしば余計な) :class:`Cursor` オブジェクトをわざわざ作り出さずに済むので、 "
2551
- "コードをより簡潔に書くことができます。 :class:`Cursor` オブジェクトは暗黙裡に "
2552
- "生成されショートカットメソッドの戻り値として受け取ることができます。この方法 "
2553
- "を使えば 、 ``SELECT`` 文を実行してその結果について反復することが、 :class: "
2554
- "`Connection` オブジェクトに対する呼び出し一つで行なえます。"
2548
+ ":class:`Connection` クラスのメソッド :meth:`~Connection.execute` と :meth:"
2549
+ "`~Connection.executemany` と :meth:`~Connection.executescript` を使うこと "
2550
+ "で、 (しばしば余計な) :class:`Cursor` オブジェクトをわざわざ作り出さずに済む "
2551
+ "ので、 コードをより簡潔に書くことができます。 :class:`Cursor` オブジェクトは暗 "
2552
+ "黙裡に生成され、ショートカット・メソッドの戻り値として受け取ることができま "
2553
+ "す。この方法を使えば 、 ``SELECT`` 文を実行してその結果について反復すること "
2554
+ "が、 :class: `Connection` オブジェクトに対する呼び出し一つで行なえます。"
2555
2555
2556
2556
#: ../../library/sqlite3.rst:2178
2557
2557
msgid "How to use the connection context manager"
@@ -2566,12 +2566,6 @@ msgid ""
2566
2566
"fails, or if the body of the ``with`` statement raises an uncaught "
2567
2567
"exception, the transaction is rolled back."
2568
2568
msgstr ""
2569
- "Connection object can be used as a context manager that automatically "
2570
- "commits or rolls back open transactions when leaving the body of the context "
2571
- "manager. If the body of the with statement finishes without exceptions, the "
2572
- "transaction is committed. If this commit fails, or if the body of the "
2573
- "``with`` statement raises an uncaught exception, the transaction is rolled "
2574
- "back.\n"
2575
2569
":class:`Connection` ブジェクトは、コンテキストマネージャのブロックから離れる"
2576
2570
"ときに、開いているトランザクションを自動的にコミットまたはロールバックするコ"
2577
2571
"ンテキストマネージャとして使用できます。 :keyword:`with` 文のブロックが例外無"
@@ -2625,6 +2619,8 @@ msgid ""
2625
2619
"More information about this feature, including a list of parameters, can be "
2626
2620
"found in the `SQLite URI documentation`_."
2627
2621
msgstr ""
2622
+ "パラメータのリストを含む、この機能の詳細については、 `SQLite URI "
2623
+ "documentation`_ を参照してください。"
2628
2624
2629
2625
#: ../../library/sqlite3.rst:2273
2630
2626
msgid "How to create and use row factories"
@@ -2636,6 +2632,10 @@ msgid ""
2636
2632
"class:`!tuple` does not suit your needs, you can use the :class:`sqlite3."
2637
2633
"Row` class or a custom :attr:`~Cursor.row_factory`."
2638
2634
msgstr ""
2635
+ "デフォルトでは、 :mod:`!sqlite3` は各行(row)を :class:`タプル <tuple>` として"
2636
+ "表します。 :class:`タプル <!tuple>` があなたのニーズと合わない場合は、 :"
2637
+ "class:`sqlite3.Row` クラスまたはカスタム :attr:`~Cursor.row_factory` を使用で"
2638
+ "きます。"
2639
2639
2640
2640
#: ../../library/sqlite3.rst:2280
2641
2641
msgid ""
@@ -2644,6 +2644,10 @@ msgid ""
2644
2644
"`Connection.row_factory`, so all cursors created from the connection will "
2645
2645
"use the same row factory."
2646
2646
msgstr ""
2647
+ ":attr:`!row_factory` は :class:`Cursor` と :class:`Connection` の両方に属性と"
2648
+ "して存在しますが、 その接続(connection)から作成されたすべてのカーソルが同一の"
2649
+ "行工場(row factory)を使用するようにするために、 :class:`Connection."
2650
+ "row_factory` を設定することをお勧めします。"
2647
2651
2648
2652
#: ../../library/sqlite3.rst:2285
2649
2653
msgid ""
@@ -2656,32 +2660,41 @@ msgstr ""
2656
2660
#: ../../library/sqlite3.rst:2295
2657
2661
msgid "Queries now return :class:`!Row` objects:"
2658
2662
msgstr ""
2663
+ "このように設定すると、クエリは :class:`!Row`オブジェクトを返すようになります:"
2659
2664
2660
2665
#: ../../library/sqlite3.rst:2310
2661
2666
msgid ""
2662
2667
"You can create a custom :attr:`~Cursor.row_factory` that returns each row as "
2663
2668
"a :class:`dict`, with column names mapped to values:"
2664
2669
msgstr ""
2670
+ "各列名が各値にマップされた :class:`dict` として行を返す、カスタム :attr:"
2671
+ "`~Cursor.row_factory` を作成することもできます:"
2665
2672
2666
2673
#: ../../library/sqlite3.rst:2319
2667
2674
msgid ""
2668
2675
"Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`:"
2669
2676
msgstr ""
2677
+ "これを使うと、クエリは :class:`タプル <!tuple>` の代わりに :class:`!dict` を"
2678
+ "返すようになります:"
2670
2679
2671
2680
#: ../../library/sqlite3.rst:2329
2672
2681
msgid "The following row factory returns a :term:`named tuple`:"
2673
2682
msgstr ""
2683
+ "以下の行工場(row factory)は :term:`名前付きタプル <named tuple>` を返します:"
2674
2684
2675
2685
#: ../../library/sqlite3.rst:2340
2676
2686
msgid ":func:`!namedtuple_factory` can be used as follows:"
2677
- msgstr ""
2687
+ msgstr ":func:`!namedtuple_factory` は以下のようにして使う事ができます: "
2678
2688
2679
2689
#: ../../library/sqlite3.rst:2355
2680
2690
msgid ""
2681
2691
"With some adjustments, the above recipe can be adapted to use a :class:"
2682
2692
"`~dataclasses.dataclass`, or any other custom class, instead of a :class:"
2683
2693
"`~collections.namedtuple`."
2684
2694
msgstr ""
2695
+ "上記レシピをチューニングすれば、 :class:`~collections.namedtuple` の代わり"
2696
+ "に :class:`~dataclasses.dataclass` または、その他のカスタム・クラスを使用する"
2697
+ "ように適合(adapt)させることができます。"
2685
2698
2686
2699
#: ../../library/sqlite3.rst:2363
2687
2700
msgid "Explanation"
0 commit comments