@@ -1273,25 +1273,25 @@ msgstr "输入转换器。"
12731273msgid ""
12741274"Let's go back to the :class:`Point` class. We stored the x and y coordinates"
12751275" separated via semicolons as strings in SQLite."
1276- msgstr ""
1276+ msgstr "让我们回到 :class:`Point` 类。 我们以字符串形式在 SQLite 中存储了 x 和 y 坐标值。 "
12771277
12781278#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:965
12791279msgid ""
12801280"First, we'll define a converter function that accepts the string as a "
12811281"parameter and constructs a :class:`Point` object from it."
1282- msgstr ""
1282+ msgstr "首先,我们将定义一个转换器函数,它接受这样的字符串作为形参并根据该参数构造一个 :class:`Point` 对象。 "
12831283
12841284#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:970
12851285msgid ""
12861286"Converter functions **always** get called with a :class:`bytes` object, no "
12871287"matter under which data type you sent the value to SQLite."
1288- msgstr ""
1288+ msgstr "转换器函数在调用时 **总是** 会附带一个 :class:`bytes` 对象,无论你将何种数据类型的值发给 SQLite。 "
12891289
12901290#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:979
12911291msgid ""
12921292"Now you need to make the :mod:`sqlite3` module know that what you select "
12931293"from the database is actually a point. There are two ways of doing this:"
1294- msgstr ""
1294+ msgstr "现在你需要让 :mod:`sqlite3` 模块知道你从数据库中选取的其实是一个点对象。 有两种方式都可以做到这件事: "
12951295
12961296#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:982
12971297msgid "Implicitly via the declared type"
@@ -1307,6 +1307,8 @@ msgid ""
13071307"entries for the constants :const:`PARSE_DECLTYPES` and "
13081308":const:`PARSE_COLNAMES`."
13091309msgstr ""
1310+ "这两种方式会在 :ref:`sqlite3-module-contents` 一节中描述,相应条目为 :const:`PARSE_DECLTYPES` "
1311+ "和 :const:`PARSE_COLNAMES` 常量。"
13101312
13111313#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:989
13121314msgid "The following example illustrates both approaches."
@@ -1321,20 +1323,26 @@ msgid ""
13211323"There are default adapters for the date and datetime types in the datetime "
13221324"module. They will be sent as ISO dates/ISO timestamps to SQLite."
13231325msgstr ""
1326+ "对于 datetime 模块中的 date 和 datetime 类型已提供了默认的适配器。 它们将会以 ISO 日期/ISO 时间戳的形式发给 "
1327+ "SQLite。"
13241328
13251329#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:1000
13261330msgid ""
13271331"The default converters are registered under the name \" date\" for "
13281332":class:`datetime.date` and under the name \" timestamp\" for "
13291333":class:`datetime.datetime`."
13301334msgstr ""
1335+ "默认转换器使用的注册名称是针对 :class:`datetime.date` 的 \" date\" 和针对 "
1336+ ":class:`datetime.datetime` 的 \" timestamp\" 。"
13311337
13321338#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:1004
13331339msgid ""
13341340"This way, you can use date/timestamps from Python without any additional "
13351341"fiddling in most cases. The format of the adapters is also compatible with "
13361342"the experimental SQLite date/time functions."
13371343msgstr ""
1344+ "通过这种方式,你可以在大多数情况下使用 Python 的 date/timestamp 对象而无须任何额外处理。 适配器的格式还与实验性的 SQLite"
1345+ " date/time 函数兼容。"
13381346
13391347#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:1008
13401348msgid "The following example demonstrates this."
@@ -1345,7 +1353,7 @@ msgid ""
13451353"If a timestamp stored in SQLite has a fractional part longer than 6 numbers,"
13461354" its value will be truncated to microsecond precision by the timestamp "
13471355"converter."
1348- msgstr ""
1356+ msgstr "如果存储在 SQLite 中的时间戳的小数位多于 6 个数字,则时间戳转换器会将该值截断至微秒精度。 "
13491357
13501358#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:1020
13511359msgid "Controlling Transactions"
@@ -1356,6 +1364,8 @@ msgid ""
13561364"The underlying ``sqlite3`` library operates in ``autocommit`` mode by "
13571365"default, but the Python :mod:`sqlite3` module by default does not."
13581366msgstr ""
1367+ "底层的 ``sqlite3`` 库默认会以 ``autocommit`` 模式运行,但 Python 的 :mod:`sqlite3` "
1368+ "模块默认则不使用此模式。"
13591369
13601370#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:1025
13611371msgid ""
@@ -1364,13 +1374,18 @@ msgid ""
13641374"``autocommit`` mode, and a ``COMMIT``, a ``ROLLBACK``, or a ``RELEASE`` that"
13651375" ends the outermost transaction, turns ``autocommit`` mode back on."
13661376msgstr ""
1377+ "``autocommit`` 模式意味着修改数据库的操作会立即生效。 ``BEGIN`` 或 ``SAVEPOINT`` 语句会禁用 "
1378+ "``autocommit`` 模式,而用于结束外层事务的 ``COMMIT``, ``ROLLBACK`` 或 ``RELEASE`` 则会恢复 "
1379+ "``autocommit`` 模式。"
13671380
13681381#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:1030
13691382msgid ""
13701383"The Python :mod:`sqlite3` module by default issues a ``BEGIN`` statement "
13711384"implicitly before a Data Modification Language (DML) statement (i.e. "
13721385"``INSERT``/``UPDATE``/``DELETE``/``REPLACE``)."
13731386msgstr ""
1387+ "Python 的 :mod:`sqlite3` 模块默认会在数据修改语言 (DML) 类语句 (即 "
1388+ "``INSERT``/``UPDATE``/``DELETE``/``REPLACE``) 之前隐式地执行一条 ``BEGIN`` 语句。"
13741389
13751390#: /home/travis/build/python/cpython-doc-catalog/Doc/library/sqlite3.rst:1034
13761391msgid ""
0 commit comments