Skip to content

Commit a2f8f78

Browse files
sync with cpython db65a326
1 parent 1bfbdbc commit a2f8f78

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

library/sqlite3.po

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-01-15 00:18+0000\n"
10+
"POT-Creation-Date: 2023-01-19 00:17+0000\n"
1111
"PO-Revision-Date: 2018-05-23 16:10+0000\n"
1212
"Last-Translator: Adrian Liaw <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1773,24 +1773,24 @@ msgid ""
17731773
"are ignored. Here's an example of both styles:"
17741774
msgstr ""
17751775

1776-
#: ../../library/sqlite3.rst:1866
1776+
#: ../../library/sqlite3.rst:1865
17771777
msgid ""
17781778
":pep:`249` numeric placeholders are *not* supported. If used, they will be "
17791779
"interpreted as named placeholders."
17801780
msgstr ""
17811781

1782-
#: ../../library/sqlite3.rst:1873
1782+
#: ../../library/sqlite3.rst:1872
17831783
msgid "How to adapt custom Python types to SQLite values"
17841784
msgstr ""
17851785

1786-
#: ../../library/sqlite3.rst:1875
1786+
#: ../../library/sqlite3.rst:1874
17871787
msgid ""
17881788
"SQLite supports only a limited set of data types natively. To store custom "
17891789
"Python types in SQLite databases, *adapt* them to one of the :ref:`Python "
17901790
"types SQLite natively understands <sqlite3-types>`."
17911791
msgstr ""
17921792

1793-
#: ../../library/sqlite3.rst:1879
1793+
#: ../../library/sqlite3.rst:1878
17941794
msgid ""
17951795
"There are two ways to adapt Python objects to SQLite types: letting your "
17961796
"object adapt itself, or using an *adapter callable*. The latter will take "
@@ -1800,11 +1800,11 @@ msgid ""
18001800
"custom adapter functions."
18011801
msgstr ""
18021802

1803-
#: ../../library/sqlite3.rst:1891
1803+
#: ../../library/sqlite3.rst:1890
18041804
msgid "How to write adaptable objects"
18051805
msgstr ""
18061806

1807-
#: ../../library/sqlite3.rst:1893
1807+
#: ../../library/sqlite3.rst:1892
18081808
msgid ""
18091809
"Suppose we have a :class:`!Point` class that represents a pair of "
18101810
"coordinates, ``x`` and ``y``, in a Cartesian coordinate system. The "
@@ -1814,84 +1814,84 @@ msgid ""
18141814
"object passed to *protocol* will be of type :class:`PrepareProtocol`."
18151815
msgstr ""
18161816

1817-
#: ../../library/sqlite3.rst:1924
1817+
#: ../../library/sqlite3.rst:1923
18181818
msgid "How to register adapter callables"
18191819
msgstr ""
18201820

1821-
#: ../../library/sqlite3.rst:1926
1821+
#: ../../library/sqlite3.rst:1925
18221822
msgid ""
18231823
"The other possibility is to create a function that converts the Python "
18241824
"object to an SQLite-compatible type. This function can then be registered "
18251825
"using :func:`register_adapter`."
18261826
msgstr ""
18271827

1828-
#: ../../library/sqlite3.rst:1956
1828+
#: ../../library/sqlite3.rst:1955
18291829
msgid "How to convert SQLite values to custom Python types"
18301830
msgstr ""
18311831

1832-
#: ../../library/sqlite3.rst:1958
1832+
#: ../../library/sqlite3.rst:1957
18331833
msgid ""
18341834
"Writing an adapter lets you convert *from* custom Python types *to* SQLite "
18351835
"values. To be able to convert *from* SQLite values *to* custom Python types, "
18361836
"we use *converters*."
18371837
msgstr ""
18381838

1839-
#: ../../library/sqlite3.rst:1963
1839+
#: ../../library/sqlite3.rst:1962
18401840
msgid ""
18411841
"Let's go back to the :class:`!Point` class. We stored the x and y "
18421842
"coordinates separated via semicolons as strings in SQLite."
18431843
msgstr ""
18441844

1845-
#: ../../library/sqlite3.rst:1966
1845+
#: ../../library/sqlite3.rst:1965
18461846
msgid ""
18471847
"First, we'll define a converter function that accepts the string as a "
18481848
"parameter and constructs a :class:`!Point` object from it."
18491849
msgstr ""
18501850

1851-
#: ../../library/sqlite3.rst:1971
1851+
#: ../../library/sqlite3.rst:1970
18521852
msgid ""
18531853
"Converter functions are **always** passed a :class:`bytes` object, no matter "
18541854
"the underlying SQLite data type."
18551855
msgstr ""
18561856

1857-
#: ../../library/sqlite3.rst:1980
1857+
#: ../../library/sqlite3.rst:1979
18581858
msgid ""
18591859
"We now need to tell :mod:`!sqlite3` when it should convert a given SQLite "
18601860
"value. This is done when connecting to a database, using the *detect_types* "
18611861
"parameter of :func:`connect`. There are three options:"
18621862
msgstr ""
18631863

1864-
#: ../../library/sqlite3.rst:1984
1864+
#: ../../library/sqlite3.rst:1983
18651865
msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`"
18661866
msgstr ""
18671867

1868-
#: ../../library/sqlite3.rst:1985
1868+
#: ../../library/sqlite3.rst:1984
18691869
msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`"
18701870
msgstr ""
18711871

1872-
#: ../../library/sqlite3.rst:1986
1872+
#: ../../library/sqlite3.rst:1985
18731873
msgid ""
18741874
"Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3."
18751875
"PARSE_COLNAMES``. Column names take precedence over declared types."
18761876
msgstr ""
18771877

1878-
#: ../../library/sqlite3.rst:1990
1878+
#: ../../library/sqlite3.rst:1989
18791879
msgid "The following example illustrates the implicit and explicit approaches:"
18801880
msgstr ""
18811881

1882-
#: ../../library/sqlite3.rst:2041
1882+
#: ../../library/sqlite3.rst:2040
18831883
msgid "Adapter and converter recipes"
18841884
msgstr ""
18851885

1886-
#: ../../library/sqlite3.rst:2043
1886+
#: ../../library/sqlite3.rst:2042
18871887
msgid "This section shows recipes for common adapters and converters."
18881888
msgstr ""
18891889

1890-
#: ../../library/sqlite3.rst:2105
1890+
#: ../../library/sqlite3.rst:2104
18911891
msgid "How to use connection shortcut methods"
18921892
msgstr ""
18931893

1894-
#: ../../library/sqlite3.rst:2107
1894+
#: ../../library/sqlite3.rst:2106
18951895
msgid ""
18961896
"Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, and :"
18971897
"meth:`~Connection.executescript` methods of the :class:`Connection` class, "
@@ -1903,11 +1903,11 @@ msgid ""
19031903
"object."
19041904
msgstr ""
19051905

1906-
#: ../../library/sqlite3.rst:2148
1906+
#: ../../library/sqlite3.rst:2147
19071907
msgid "How to use the connection context manager"
19081908
msgstr ""
19091909

1910-
#: ../../library/sqlite3.rst:2150
1910+
#: ../../library/sqlite3.rst:2149
19111911
msgid ""
19121912
"A :class:`Connection` object can be used as a context manager that "
19131913
"automatically commits or rolls back open transactions when leaving the body "
@@ -1917,118 +1917,118 @@ msgid ""
19171917
"exception, the transaction is rolled back."
19181918
msgstr ""
19191919

1920-
#: ../../library/sqlite3.rst:2159
1920+
#: ../../library/sqlite3.rst:2158
19211921
msgid ""
19221922
"If there is no open transaction upon leaving the body of the ``with`` "
19231923
"statement, the context manager is a no-op."
19241924
msgstr ""
19251925

1926-
#: ../../library/sqlite3.rst:2164
1926+
#: ../../library/sqlite3.rst:2163
19271927
msgid ""
19281928
"The context manager neither implicitly opens a new transaction nor closes "
19291929
"the connection."
19301930
msgstr ""
19311931

1932-
#: ../../library/sqlite3.rst:2197
1932+
#: ../../library/sqlite3.rst:2196
19331933
msgid "How to work with SQLite URIs"
19341934
msgstr ""
19351935

1936-
#: ../../library/sqlite3.rst:2199
1936+
#: ../../library/sqlite3.rst:2198
19371937
msgid "Some useful URI tricks include:"
19381938
msgstr ""
19391939

1940-
#: ../../library/sqlite3.rst:2201
1940+
#: ../../library/sqlite3.rst:2200
19411941
msgid "Open a database in read-only mode:"
19421942
msgstr ""
19431943

1944-
#: ../../library/sqlite3.rst:2210
1944+
#: ../../library/sqlite3.rst:2209
19451945
msgid ""
19461946
"Do not implicitly create a new database file if it does not already exist; "
19471947
"will raise :exc:`~sqlite3.OperationalError` if unable to create a new file:"
19481948
msgstr ""
19491949

1950-
#: ../../library/sqlite3.rst:2220
1950+
#: ../../library/sqlite3.rst:2219
19511951
msgid "Create a shared named in-memory database:"
19521952
msgstr ""
19531953

1954-
#: ../../library/sqlite3.rst:2234
1954+
#: ../../library/sqlite3.rst:2233
19551955
msgid ""
19561956
"More information about this feature, including a list of parameters, can be "
19571957
"found in the `SQLite URI documentation`_."
19581958
msgstr ""
19591959

1960-
#: ../../library/sqlite3.rst:2243
1960+
#: ../../library/sqlite3.rst:2242
19611961
msgid "How to create and use row factories"
19621962
msgstr ""
19631963

1964-
#: ../../library/sqlite3.rst:2245
1964+
#: ../../library/sqlite3.rst:2244
19651965
msgid ""
19661966
"By default, :mod:`!sqlite3` represents each row as a :class:`tuple`. If a :"
19671967
"class:`!tuple` does not suit your needs, you can use the :class:`sqlite3."
19681968
"Row` class or a custom :attr:`~Cursor.row_factory`."
19691969
msgstr ""
19701970

1971-
#: ../../library/sqlite3.rst:2250
1971+
#: ../../library/sqlite3.rst:2249
19721972
msgid ""
19731973
"While :attr:`!row_factory` exists as an attribute both on the :class:"
19741974
"`Cursor` and the :class:`Connection`, it is recommended to set :class:"
19751975
"`Connection.row_factory`, so all cursors created from the connection will "
19761976
"use the same row factory."
19771977
msgstr ""
19781978

1979-
#: ../../library/sqlite3.rst:2255
1979+
#: ../../library/sqlite3.rst:2254
19801980
msgid ""
19811981
":class:`!Row` provides indexed and case-insensitive named access to columns, "
19821982
"with minimal memory overhead and performance impact over a :class:`!tuple`. "
19831983
"To use :class:`!Row` as a row factory, assign it to the :attr:`!row_factory` "
19841984
"attribute:"
19851985
msgstr ""
19861986

1987-
#: ../../library/sqlite3.rst:2265
1987+
#: ../../library/sqlite3.rst:2264
19881988
msgid "Queries now return :class:`!Row` objects:"
19891989
msgstr ""
19901990

1991-
#: ../../library/sqlite3.rst:2280
1991+
#: ../../library/sqlite3.rst:2279
19921992
msgid ""
19931993
"You can create a custom :attr:`~Cursor.row_factory` that returns each row as "
19941994
"a :class:`dict`, with column names mapped to values:"
19951995
msgstr ""
19961996

1997-
#: ../../library/sqlite3.rst:2289
1997+
#: ../../library/sqlite3.rst:2288
19981998
msgid ""
19991999
"Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`:"
20002000
msgstr ""
20012001

2002-
#: ../../library/sqlite3.rst:2299
2002+
#: ../../library/sqlite3.rst:2298
20032003
msgid "The following row factory returns a :term:`named tuple`:"
20042004
msgstr ""
20052005

2006-
#: ../../library/sqlite3.rst:2310
2006+
#: ../../library/sqlite3.rst:2309
20072007
msgid ":func:`!namedtuple_factory` can be used as follows:"
20082008
msgstr ""
20092009

2010-
#: ../../library/sqlite3.rst:2325
2010+
#: ../../library/sqlite3.rst:2324
20112011
msgid ""
20122012
"With some adjustments, the above recipe can be adapted to use a :class:"
20132013
"`~dataclasses.dataclass`, or any other custom class, instead of a :class:"
20142014
"`~collections.namedtuple`."
20152015
msgstr ""
20162016

2017-
#: ../../library/sqlite3.rst:2333
2017+
#: ../../library/sqlite3.rst:2332
20182018
msgid "Explanation"
20192019
msgstr "解釋"
20202020

2021-
#: ../../library/sqlite3.rst:2338
2021+
#: ../../library/sqlite3.rst:2337
20222022
msgid "Transaction control"
20232023
msgstr ""
20242024

2025-
#: ../../library/sqlite3.rst:2340
2025+
#: ../../library/sqlite3.rst:2339
20262026
msgid ""
20272027
"The :mod:`!sqlite3` module does not adhere to the transaction handling "
20282028
"recommended by :pep:`249`."
20292029
msgstr ""
20302030

2031-
#: ../../library/sqlite3.rst:2343
2031+
#: ../../library/sqlite3.rst:2342
20322032
msgid ""
20332033
"If the connection attribute :attr:`~Connection.isolation_level` is not "
20342034
"``None``, new transactions are implicitly opened before :meth:`~Cursor."
@@ -2042,7 +2042,7 @@ msgid ""
20422042
"attribute."
20432043
msgstr ""
20442044

2045-
#: ../../library/sqlite3.rst:2356
2045+
#: ../../library/sqlite3.rst:2355
20462046
msgid ""
20472047
"If :attr:`~Connection.isolation_level` is set to ``None``, no transactions "
20482048
"are implicitly opened at all. This leaves the underlying SQLite library in "
@@ -2052,14 +2052,14 @@ msgid ""
20522052
"in_transaction` attribute."
20532053
msgstr ""
20542054

2055-
#: ../../library/sqlite3.rst:2364
2055+
#: ../../library/sqlite3.rst:2363
20562056
msgid ""
20572057
"The :meth:`~Cursor.executescript` method implicitly commits any pending "
20582058
"transaction before execution of the given SQL script, regardless of the "
20592059
"value of :attr:`~Connection.isolation_level`."
20602060
msgstr ""
20612061

2062-
#: ../../library/sqlite3.rst:2368
2062+
#: ../../library/sqlite3.rst:2367
20632063
msgid ""
20642064
":mod:`!sqlite3` used to implicitly commit an open transaction before DDL "
20652065
"statements. This is no longer the case."

0 commit comments

Comments
 (0)