@@ -262,13 +262,17 @@ msgid ""
262262" the module-level :func:`register_converter` function allow you to easily do"
263263" that."
264264msgstr ""
265+ "SQLite 原生只支持5种类型:TEXT,INTEGER,REAL,BLOB 和 NULL。如果你想用其它类型,你必须自己添加相应的支持。使用 "
266+ "*detect_types* 参数和模块级别的 :func:`register_converter` 函数注册**转换器** 可以简单的实现。"
265267
266268#: ../../library/sqlite3.rst:197
267269msgid ""
268270"*detect_types* defaults to 0 (i. e. off, no type detection), you can set it "
269271"to any combination of :const:`PARSE_DECLTYPES` and :const:`PARSE_COLNAMES` "
270272"to turn type detection on."
271273msgstr ""
274+ "*detect_types* 默认为0(即关闭,没有类型检测)。你也可以组合 :const:`PARSE_DECLTYPES` 和 "
275+ ":const:`PARSE_COLNAMES` 来开启类型检测。"
272276
273277#: ../../library/sqlite3.rst:201
274278msgid ""
@@ -278,6 +282,8 @@ msgid ""
278282"threads with the same connection writing operations should be serialized by "
279283"the user to avoid data corruption."
280284msgstr ""
285+ "默认情况下,*check_same_thread* 为 :const:`True`,只有当前的线程可以使用该连接。 如果设置为 "
286+ ":const:`False`,则多个线程可以共享返回的连接。 当多个线程使用同一个连接的时候,用户应该把写操作进行序列化,以避免数据损坏。"
281287
282288#: ../../library/sqlite3.rst:206
283289msgid ""
@@ -286,10 +292,13 @@ msgid ""
286292" and make :func:`connect` use your class instead by providing your class for"
287293" the *factory* parameter."
288294msgstr ""
295+ "默认情况下,当调用 connect 方法的时候,:mod:`sqlite3` 模块使用了它的 :class:`Connection` "
296+ "类。当然,你也可以创建 :class:`Connection` 类的子类,然后创建提供了 *factory* 参数的 :func:`connect` "
297+ "方法。"
289298
290299#: ../../library/sqlite3.rst:211
291300msgid "Consult the section :ref:`sqlite3-types` of this manual for details."
292- msgstr ""
301+ msgstr "详情请查阅当前手册的 :ref:`sqlite3-types` 部分。 "
293302
294303#: ../../library/sqlite3.rst:213
295304msgid ""
@@ -298,29 +307,33 @@ msgid ""
298307"that are cached for the connection, you can set the *cached_statements* "
299308"parameter. The currently implemented default is to cache 100 statements."
300309msgstr ""
310+ ":mod:`sqlite3` 模块在内部使用语句缓存来避免 SQL 解析开销。 如果要显式设置当前连接可以缓存的语句数,可以设置 "
311+ "*cached_statements* 参数。 当前实现的默认值是缓存100条语句。"
301312
302313#: ../../library/sqlite3.rst:218
303314msgid ""
304315"If *uri* is true, *database* is interpreted as a URI. This allows you to "
305316"specify options. For example, to open a database in read-only mode you can "
306317"use::"
307- msgstr ""
318+ msgstr "如果 *uri* 为真,则 *database* 被解释为 URI。 它允许您指定选项。 例如,以只读模式打开数据库: "
308319
309320#: ../../library/sqlite3.rst:224
310321msgid ""
311322"More information about this feature, including a list of recognized options,"
312323" can be found in the `SQLite URI documentation "
313324"<https://www.sqlite.org/uri.html>`_."
314325msgstr ""
326+ "有关此功能的更多信息,包括已知选项的列表,可以在 ` SQLite URI 文档 <https://www.sqlite.org/uri.html>`_"
327+ " 中找到。"
315328
316329#: ../../library/sqlite3.rst:227
317330msgid "Added the *uri* parameter."
318- msgstr ""
331+ msgstr "增加了 *uri* 参数。 "
319332
320333#: ../../library/sqlite3.rst:230
321334msgid ""
322335"*database* can now also be a :term:`path-like object`, not only a string."
323- msgstr ""
336+ msgstr "*database* 现在可以是一个 :term:`path-like object` 对象了,不仅仅是字符串。 "
324337
325338#: ../../library/sqlite3.rst:236
326339msgid ""
@@ -331,6 +344,9 @@ msgid ""
331344"*typename* and the name of the type in your query are matched in case-"
332345"insensitive manner."
333346msgstr ""
347+ "注册一个回调对象 *callable*, 用来转换数据库中的字节串为自定的 Python 类型。所有类型为 *typename* "
348+ "的数据库的值在转换时,都会调用这个回调对象。通过指定 :func:`connect` 函数的 *detect-types* "
349+ "参数来设置类型检测的方式。注意,*typename* 与查询语句中的类型名进行匹配时不区分大小写。"
334350
335351#: ../../library/sqlite3.rst:245
336352msgid ""
0 commit comments