# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-11-13 20:42+0000\n"
"PO-Revision-Date: 2025-09-16 00:01+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Indonesian (https://app.transifex.com/python-doc/teams/5390/"
"id/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: id\n"
"Plural-Forms: nplurals=1; plural=0;\n"

msgid ":mod:`!sqlite3` --- DB-API 2.0 interface for SQLite databases"
msgstr ""

msgid "**Source code:** :source:`Lib/sqlite3/`"
msgstr "**Kode sumber:** :source:`Lib/sqlite3/`"

msgid ""
"SQLite is a C library that provides a lightweight disk-based database that "
"doesn't require a separate server process and allows accessing the database "
"using a nonstandard variant of the SQL query language. Some applications can "
"use SQLite for internal data storage.  It's also possible to prototype an "
"application using SQLite and then port the code to a larger database such as "
"PostgreSQL or Oracle."
msgstr ""

msgid ""
"The :mod:`!sqlite3` module was written by Gerhard Häring.  It provides an "
"SQL interface compliant with the DB-API 2.0 specification described "
"by :pep:`249`, and requires the third-party `SQLite <https://sqlite.org/>`_ "
"library."
msgstr ""

msgid ""
"This is an :term:`optional module`. If it is missing from your copy of "
"CPython, look for documentation from your distributor (that is, whoever "
"provided Python to you). If you are the distributor, see :ref:`optional-"
"module-requirements`."
msgstr ""

msgid "This document includes four main sections:"
msgstr ""

msgid ":ref:`sqlite3-tutorial` teaches how to use the :mod:`!sqlite3` module."
msgstr ""

msgid ""
":ref:`sqlite3-reference` describes the classes and functions this module "
"defines."
msgstr ""

msgid ":ref:`sqlite3-howtos` details how to handle specific tasks."
msgstr ""

msgid ""
":ref:`sqlite3-explanation` provides in-depth background on transaction "
"control."
msgstr ""

msgid "https://www.sqlite.org"
msgstr "https://www.sqlite.org"

msgid ""
"The SQLite web page; the documentation describes the syntax and the "
"available data types for the supported SQL dialect."
msgstr ""
"Halaman web SQLite; dokumentasi menjelaskan sintaks dan tipe data yang "
"tersedia untuk dialek SQL yang didukung."

msgid "https://www.w3schools.com/sql/"
msgstr "https://www.w3schools.com/sql/"

msgid "Tutorial, reference and examples for learning SQL syntax."
msgstr "Tutorial, referensi, dan contoh untuk mempelajari sintaks SQL."

msgid ":pep:`249` - Database API Specification 2.0"
msgstr ":pep:`249` - Spesifikasi API Basisdata 2.0"

msgid "PEP written by Marc-André Lemburg."
msgstr "PEP ditulis oleh Marc-André Lemburg."

msgid "Tutorial"
msgstr "Tutorial"

msgid ""
"In this tutorial, you will create a database of Monty Python movies using "
"basic :mod:`!sqlite3` functionality. It assumes a fundamental understanding "
"of database concepts, including `cursors`_ and `transactions`_."
msgstr ""

msgid ""
"First, we need to create a new database and open a database connection to "
"allow :mod:`!sqlite3` to work with it. Call :func:`sqlite3.connect` to "
"create a connection to the database :file:`tutorial.db` in the current "
"working directory, implicitly creating it if it does not exist:"
msgstr ""

msgid ""
"import sqlite3\n"
"con = sqlite3.connect(\"tutorial.db\")"
msgstr ""

msgid ""
"The returned :class:`Connection` object ``con`` represents the connection to "
"the on-disk database."
msgstr ""

msgid ""
"In order to execute SQL statements and fetch results from SQL queries, we "
"will need to use a database cursor. Call :meth:`con.cursor() "
"<Connection.cursor>` to create the :class:`Cursor`:"
msgstr ""

msgid "cur = con.cursor()"
msgstr ""

msgid ""
"Now that we've got a database connection and a cursor, we can create a "
"database table ``movie`` with columns for title, release year, and review "
"score. For simplicity, we can just use column names in the table declaration "
"-- thanks to the `flexible typing`_ feature of SQLite, specifying the data "
"types is optional. Execute the ``CREATE TABLE`` statement by "
"calling :meth:`cur.execute(...) <Cursor.execute>`:"
msgstr ""

msgid "cur.execute(\"CREATE TABLE movie(title, year, score)\")"
msgstr ""

msgid ""
"We can verify that the new table has been created by querying the "
"``sqlite_master`` table built-in to SQLite, which should now contain an "
"entry for the ``movie`` table definition (see `The Schema Table`_ for "
"details). Execute that query by calling :meth:`cur.execute(...) "
"<Cursor.execute>`, assign the result to ``res``, and "
"call :meth:`res.fetchone() <Cursor.fetchone>` to fetch the resulting row:"
msgstr ""

msgid ""
">>> res = cur.execute(\"SELECT name FROM sqlite_master\")\n"
">>> res.fetchone()\n"
"('movie',)"
msgstr ""

msgid ""
"We can see that the table has been created, as the query returns "
"a :class:`tuple` containing the table's name. If we query ``sqlite_master`` "
"for a non-existent table ``spam``, :meth:`!res.fetchone` will return "
"``None``:"
msgstr ""

msgid ""
">>> res = cur.execute(\"SELECT name FROM sqlite_master WHERE name='spam'\")\n"
">>> res.fetchone() is None\n"
"True"
msgstr ""

msgid ""
"Now, add two rows of data supplied as SQL literals by executing an "
"``INSERT`` statement, once again by calling :meth:`cur.execute(...) "
"<Cursor.execute>`:"
msgstr ""

msgid ""
"cur.execute(\"\"\"\n"
"    INSERT INTO movie VALUES\n"
"        ('Monty Python and the Holy Grail', 1975, 8.2),\n"
"        ('And Now for Something Completely Different', 1971, 7.5)\n"
"\"\"\")"
msgstr ""

msgid ""
"The ``INSERT`` statement implicitly opens a transaction, which needs to be "
"committed before changes are saved in the database (see :ref:`sqlite3-"
"controlling-transactions` for details). Call :meth:`con.commit() "
"<Connection.commit>` on the connection object to commit the transaction:"
msgstr ""

msgid "con.commit()"
msgstr ""

msgid ""
"We can verify that the data was inserted correctly by executing a ``SELECT`` "
"query. Use the now-familiar :meth:`cur.execute(...) <Cursor.execute>` to "
"assign the result to ``res``, and call :meth:`res.fetchall() "
"<Cursor.fetchall>` to return all resulting rows:"
msgstr ""

msgid ""
">>> res = cur.execute(\"SELECT score FROM movie\")\n"
">>> res.fetchall()\n"
"[(8.2,), (7.5,)]"
msgstr ""

msgid ""
"The result is a :class:`list` of two :class:`!tuple`\\s, one per row, each "
"containing that row's ``score`` value."
msgstr ""

msgid ""
"Now, insert three more rows by calling :meth:`cur.executemany(...) "
"<Cursor.executemany>`:"
msgstr ""

msgid ""
"data = [\n"
"    (\"Monty Python Live at the Hollywood Bowl\", 1982, 7.9),\n"
"    (\"Monty Python's The Meaning of Life\", 1983, 7.5),\n"
"    (\"Monty Python's Life of Brian\", 1979, 8.0),\n"
"]\n"
"cur.executemany(\"INSERT INTO movie VALUES(?, ?, ?)\", data)\n"
"con.commit()  # Remember to commit the transaction after executing INSERT."
msgstr ""

msgid ""
"Notice that ``?`` placeholders are used to bind ``data`` to the query. "
"Always use placeholders instead of :ref:`string formatting <tut-formatting>` "
"to bind Python values to SQL statements, to avoid `SQL injection attacks`_ "
"(see :ref:`sqlite3-placeholders` for more details)."
msgstr ""

msgid ""
"We can verify that the new rows were inserted by executing a ``SELECT`` "
"query, this time iterating over the results of the query:"
msgstr ""

msgid ""
">>> for row in cur.execute(\"SELECT year, title FROM movie ORDER BY "
"year\"):\n"
"...     print(row)\n"
"(1971, 'And Now for Something Completely Different')\n"
"(1975, 'Monty Python and the Holy Grail')\n"
"(1979, \"Monty Python's Life of Brian\")\n"
"(1982, 'Monty Python Live at the Hollywood Bowl')\n"
"(1983, \"Monty Python's The Meaning of Life\")"
msgstr ""

msgid ""
"Each row is a two-item :class:`tuple` of ``(year, title)``, matching the "
"columns selected in the query."
msgstr ""

msgid ""
"Finally, verify that the database has been written to disk by "
"calling :meth:`con.close() <Connection.close>` to close the existing "
"connection, opening a new one, creating a new cursor, then querying the "
"database:"
msgstr ""

msgid ""
">>> con.close()\n"
">>> new_con = sqlite3.connect(\"tutorial.db\")\n"
">>> new_cur = new_con.cursor()\n"
">>> res = new_cur.execute(\"SELECT title, year FROM movie ORDER BY score "
"DESC\")\n"
">>> title, year = res.fetchone()\n"
">>> print(f'The highest scoring Monty Python movie is {title!r}, released in "
"{year}')\n"
"The highest scoring Monty Python movie is 'Monty Python and the Holy Grail', "
"released in 1975\n"
">>> new_con.close()"
msgstr ""

msgid ""
"You've now created an SQLite database using the :mod:`!sqlite3` module, "
"inserted data and retrieved values from it in multiple ways."
msgstr ""

msgid ":ref:`sqlite3-howtos` for further reading:"
msgstr ""

msgid ":ref:`sqlite3-placeholders`"
msgstr ""

msgid ":ref:`sqlite3-adapters`"
msgstr ""

msgid ":ref:`sqlite3-converters`"
msgstr ""

msgid ":ref:`sqlite3-connection-context-manager`"
msgstr ""

msgid ":ref:`sqlite3-howto-row-factory`"
msgstr ""

msgid ""
":ref:`sqlite3-explanation` for in-depth background on transaction control."
msgstr ""

msgid "Reference"
msgstr "Referensi"

msgid "Module functions"
msgstr ""

msgid "Open a connection to an SQLite database."
msgstr ""

msgid "Parameters"
msgstr "Parameter"

msgid ""
"The path to the database file to be opened. You can pass ``\":memory:\"`` to "
"create an `SQLite database existing only in memory <https://sqlite.org/"
"inmemorydb.html>`_, and open a connection to it."
msgstr ""

msgid ""
"How many seconds the connection should wait before raising "
"an :exc:`OperationalError` when a table is locked. If another connection "
"opens a transaction to modify a table, that table will be locked until the "
"transaction is committed. Default five seconds."
msgstr ""

msgid ""
"Control whether and how data types not :ref:`natively supported by SQLite "
"<sqlite3-types>` are looked up to be converted to Python types, using the "
"converters registered with :func:`register_converter`. Set it to any "
"combination (using ``|``, bitwise or) of :const:`PARSE_DECLTYPES` "
"and :const:`PARSE_COLNAMES` to enable this. Column names take precedence "
"over declared types if both flags are set. By default (``0``), type "
"detection is disabled."
msgstr ""

msgid ""
"Control legacy transaction handling behaviour. "
"See :attr:`Connection.isolation_level` and :ref:`sqlite3-transaction-control-"
"isolation-level` for more information. Can be ``\"DEFERRED\"`` (default), "
"``\"EXCLUSIVE\"`` or ``\"IMMEDIATE\"``; or ``None`` to disable opening "
"transactions implicitly. Has no effect unless :attr:`Connection.autocommit` "
"is set to :const:`~sqlite3.LEGACY_TRANSACTION_CONTROL` (the default)."
msgstr ""

msgid ""
"If ``True`` (default), :exc:`ProgrammingError` will be raised if the "
"database connection is used by a thread other than the one that created it. "
"If ``False``, the connection may be accessed in multiple threads; write "
"operations may need to be serialized by the user to avoid data corruption. "
"See :attr:`threadsafety` for more information."
msgstr ""

msgid ""
"A custom subclass of :class:`Connection` to create the connection with, if "
"not the default :class:`Connection` class."
msgstr ""

msgid ""
"The number of statements that :mod:`!sqlite3` should internally cache for "
"this connection, to avoid parsing overhead. By default, 128 statements."
msgstr ""

msgid ""
"If set to ``True``, *database* is interpreted as a :abbr:`URI (Uniform "
"Resource Identifier)` with a file path and an optional query string. The "
"scheme part *must* be ``\"file:\"``, and the path can be relative or "
"absolute. The query string allows passing parameters to SQLite, enabling "
"various :ref:`sqlite3-uri-tricks`."
msgstr ""

msgid ""
"Control :pep:`249` transaction handling behaviour. "
"See :attr:`Connection.autocommit` and :ref:`sqlite3-transaction-control-"
"autocommit` for more information. *autocommit* currently defaults "
"to :const:`~sqlite3.LEGACY_TRANSACTION_CONTROL`. The default will change to "
"``False`` in a future Python release."
msgstr ""

msgid "Return type"
msgstr ""

msgid ""
"Raises an :ref:`auditing event <auditing>` ``sqlite3.connect`` with argument "
"``database``."
msgstr ""

msgid ""
"Raises an :ref:`auditing event <auditing>` ``sqlite3.connect/handle`` with "
"argument ``connection_handle``."
msgstr ""

msgid "Added the *uri* parameter."
msgstr "Menambahkan parameter *uri*."

msgid ""
"*database* can now also be a :term:`path-like object`, not only a string."
msgstr ""

msgid "Added the ``sqlite3.connect/handle`` auditing event."
msgstr ""

msgid "Added the *autocommit* parameter."
msgstr ""

msgid "All parameters except *database* are now keyword-only."
msgstr ""

msgid ""
"Return ``True`` if the string *statement* appears to contain one or more "
"complete SQL statements. No syntactic verification or parsing of any kind is "
"performed, other than checking that there are no unclosed string literals "
"and the statement is terminated by a semicolon."
msgstr ""

msgid "For example:"
msgstr "Sebagai contoh:"

msgid ""
">>> sqlite3.complete_statement(\"SELECT foo FROM bar;\")\n"
"True\n"
">>> sqlite3.complete_statement(\"SELECT foo\")\n"
"False"
msgstr ""

msgid ""
"This function may be useful during command-line input to determine if the "
"entered text seems to form a complete SQL statement, or if additional input "
"is needed before calling :meth:`~Cursor.execute`."
msgstr ""

msgid ""
"See :func:`!runsource` in :source:`Lib/sqlite3/__main__.py` for real-world "
"use."
msgstr ""

msgid ""
"Enable or disable callback tracebacks. By default you will not get any "
"tracebacks in user-defined functions, aggregates, converters, authorizer "
"callbacks etc. If you want to debug them, you can call this function with "
"*flag* set to ``True``. Afterwards, you will get tracebacks from callbacks "
"on :data:`sys.stderr`. Use ``False`` to disable the feature again."
msgstr ""

msgid ""
"Errors in user-defined function callbacks are logged as unraisable "
"exceptions. Use an :func:`unraisable hook handler <sys.unraisablehook>` for "
"introspection of the failed callback."
msgstr ""

msgid ""
"Register an *adapter* :term:`callable` to adapt the Python type *type* into "
"an SQLite type. The adapter is called with a Python object of type *type* as "
"its sole argument, and must return a value of a :ref:`type that SQLite "
"natively understands <sqlite3-types>`."
msgstr ""

msgid ""
"Register the *converter* :term:`callable` to convert SQLite objects of type "
"*typename* into a Python object of a specific type. The converter is invoked "
"for all SQLite values of type *typename*; it is passed a :class:`bytes` "
"object and should return an object of the desired Python type. Consult the "
"parameter *detect_types* of :func:`connect` for information regarding how "
"type detection works."
msgstr ""

msgid ""
"Note: *typename* and the name of the type in your query are matched case-"
"insensitively."
msgstr ""

msgid "Module constants"
msgstr ""

msgid ""
"Set :attr:`~Connection.autocommit` to this constant to select old style (pre-"
"Python 3.12) transaction control behaviour. See :ref:`sqlite3-transaction-"
"control-isolation-level` for more information."
msgstr ""

msgid ""
"Pass this flag value to the *detect_types* parameter of :func:`connect` to "
"look up a converter function using the declared types for each column. The "
"types are declared when the database table is created. :mod:`!sqlite3` will "
"look up a converter function using the first word of the declared type as "
"the converter dictionary key. For example:"
msgstr ""

msgid ""
"CREATE TABLE test(\n"
"   i integer primary key,  ! will look up a converter named \"integer\"\n"
"   p point,                ! will look up a converter named \"point\"\n"
"   n number(10)            ! will look up a converter named \"number\"\n"
" )"
msgstr ""

msgid ""
"This flag may be combined with :const:`PARSE_COLNAMES` using the ``|`` "
"(bitwise or) operator."
msgstr ""

msgid ""
"Generated fields (for example ``MAX(p)``) are returned as :class:`str`. "
"Use :const:`!PARSE_COLNAMES` to enforce types for such queries."
msgstr ""

msgid ""
"Pass this flag value to the *detect_types* parameter of :func:`connect` to "
"look up a converter function by using the type name, parsed from the query "
"column name, as the converter dictionary key. The query column name must be "
"wrapped in double quotes (``\"``) and the type name must be wrapped in "
"square brackets (``[]``)."
msgstr ""

msgid ""
"SELECT MAX(p) as \"p [point]\" FROM test;  ! will look up converter \"point\""
msgstr ""

msgid ""
"This flag may be combined with :const:`PARSE_DECLTYPES` using the ``|`` "
"(bitwise or) operator."
msgstr ""

msgid ""
"Flags that should be returned by the *authorizer_callback* :term:`callable` "
"passed to :meth:`Connection.set_authorizer`, to indicate whether:"
msgstr ""

msgid "Access is allowed (:const:`!SQLITE_OK`),"
msgstr ""

msgid ""
"The SQL statement should be aborted with an error (:const:`!SQLITE_DENY`)"
msgstr ""

msgid ""
"The column should be treated as a ``NULL`` value (:const:`!SQLITE_IGNORE`)"
msgstr ""

msgid ""
"String constant stating the supported DB-API level. Required by the DB-API. "
"Hard-coded to ``\"2.0\"``."
msgstr ""

msgid ""
"String constant stating the type of parameter marker formatting expected by "
"the :mod:`!sqlite3` module. Required by the DB-API. Hard-coded to "
"``\"qmark\"``."
msgstr ""

msgid "The ``named`` DB-API parameter style is also supported."
msgstr ""

msgid ""
"Version number of the runtime SQLite library as a :class:`string <str>`."
msgstr ""

msgid ""
"Version number of the runtime SQLite library as a :class:`tuple` "
"of :class:`integers <int>`."
msgstr ""

msgid "A :class:`tuple` containing all SQLite keywords."
msgstr ""

msgid ""
"This constant is only available if Python was compiled with SQLite 3.24.0 or "
"greater."
msgstr ""

msgid ""
"Integer constant required by the DB-API 2.0, stating the level of thread "
"safety the :mod:`!sqlite3` module supports. This attribute is set based on "
"the default `threading mode <https://sqlite.org/threadsafe.html>`_ the "
"underlying SQLite library is compiled with. The SQLite threading modes are:"
msgstr ""

msgid ""
"**Single-thread**: In this mode, all mutexes are disabled and SQLite is "
"unsafe to use in more than a single thread at once."
msgstr ""

msgid ""
"**Multi-thread**: In this mode, SQLite can be safely used by multiple "
"threads provided that no single database connection is used simultaneously "
"in two or more threads."
msgstr ""

msgid ""
"**Serialized**: In serialized mode, SQLite can be safely used by multiple "
"threads with no restriction."
msgstr ""

msgid ""
"The mappings from SQLite threading modes to DB-API 2.0 threadsafety levels "
"are as follows:"
msgstr ""

msgid "SQLite threading mode"
msgstr ""

msgid ":pep:`threadsafety <0249#threadsafety>`"
msgstr ""

msgid "`SQLITE_THREADSAFE`_"
msgstr ""

msgid "DB-API 2.0 meaning"
msgstr ""

msgid "single-thread"
msgstr ""

msgid "0"
msgstr "0"

msgid "Threads may not share the module"
msgstr ""

msgid "multi-thread"
msgstr ""

msgid "1"
msgstr "1"

msgid "2"
msgstr "2"

msgid "Threads may share the module, but not connections"
msgstr ""

msgid "serialized"
msgstr ""

msgid "3"
msgstr "3"

msgid "Threads may share the module, connections and cursors"
msgstr ""

msgid "Set *threadsafety* dynamically instead of hard-coding it to ``1``."
msgstr ""

msgid ""
"These constants are used for the :meth:`Connection.setconfig` "
"and :meth:`~Connection.getconfig` methods."
msgstr ""

msgid ""
"The availability of these constants varies depending on the version of "
"SQLite Python was compiled with."
msgstr ""

msgid "https://www.sqlite.org/c3ref/c_dbconfig_defensive.html"
msgstr ""

msgid "SQLite docs: Database Connection Configuration Options"
msgstr ""

msgid "The :data:`!version` and :data:`!version_info` constants."
msgstr ""

msgid "Connection objects"
msgstr ""

msgid ""
"Each open SQLite database is represented by a ``Connection`` object, which "
"is created using :func:`sqlite3.connect`. Their main purpose is "
"creating :class:`Cursor` objects, and :ref:`sqlite3-controlling-"
"transactions`."
msgstr ""

msgid ":ref:`sqlite3-connection-shortcuts`"
msgstr ""

msgid ""
"A :exc:`ResourceWarning` is emitted if :meth:`close` is not called before "
"a :class:`!Connection` object is deleted."
msgstr ""

msgid "An SQLite database connection has the following attributes and methods:"
msgstr ""

msgid ""
"Create and return a :class:`Cursor` object. The cursor method accepts a "
"single optional parameter *factory*. If supplied, this must be "
"a :term:`callable` returning an instance of :class:`Cursor` or its "
"subclasses."
msgstr ""

msgid ""
"Open a :class:`Blob` handle to an existing :abbr:`BLOB (Binary Large "
"OBject)`."
msgstr ""

msgid "The name of the table where the blob is located."
msgstr ""

msgid "The name of the column where the blob is located."
msgstr ""

msgid "The row id where the blob is located."
msgstr ""

msgid ""
"Set to ``True`` if the blob should be opened without write permissions. "
"Defaults to ``False``."
msgstr ""

msgid ""
"The name of the database where the blob is located. Defaults to ``\"main\"``."
msgstr ""

msgid "Raises"
msgstr ""

msgid "When trying to open a blob in a ``WITHOUT ROWID`` table."
msgstr ""

msgid ""
"The blob size cannot be changed using the :class:`Blob` class. Use the SQL "
"function ``zeroblob`` to create a blob with a fixed size."
msgstr ""

msgid ""
"Commit any pending transaction to the database. If :attr:`autocommit` is "
"``True``, or there is no open transaction, this method does nothing. "
"If :attr:`!autocommit` is ``False``, a new transaction is implicitly opened "
"if a pending transaction was committed by this method."
msgstr ""

msgid ""
"Roll back to the start of any pending transaction. If :attr:`autocommit` is "
"``True``, or there is no open transaction, this method does nothing. "
"If :attr:`!autocommit` is ``False``, a new transaction is implicitly opened "
"if a pending transaction was rolled back by this method."
msgstr ""

msgid ""
"Close the database connection. If :attr:`autocommit` is ``False``, any "
"pending transaction is implicitly rolled back. If :attr:`!autocommit` is "
"``True`` or :data:`LEGACY_TRANSACTION_CONTROL`, no implicit transaction "
"control is executed. Make sure to :meth:`commit` before closing to avoid "
"losing pending changes."
msgstr ""

msgid ""
"Create a new :class:`Cursor` object and call :meth:`~Cursor.execute` on it "
"with the given *sql* and *parameters*. Return the new cursor object."
msgstr ""

msgid ""
"Create a new :class:`Cursor` object and call :meth:`~Cursor.executemany` on "
"it with the given *sql* and *parameters*. Return the new cursor object."
msgstr ""

msgid ""
"Create a new :class:`Cursor` object and call :meth:`~Cursor.executescript` "
"on it with the given *sql_script*. Return the new cursor object."
msgstr ""

msgid "Create or remove a user-defined SQL function."
msgstr ""

msgid "The name of the SQL function."
msgstr ""

msgid ""
"The number of arguments the SQL function can accept. If ``-1``, it may take "
"any number of arguments."
msgstr ""

msgid ""
"A :term:`callable` that is called when the SQL function is invoked. The "
"callable must return :ref:`a type natively supported by SQLite <sqlite3-"
"types>`. Set to ``None`` to remove an existing SQL function."
msgstr ""

msgid ""
"If ``True``, the created SQL function is marked as `deterministic <https://"
"sqlite.org/deterministic.html>`_, which allows SQLite to perform additional "
"optimizations."
msgstr ""

msgid "Added the *deterministic* parameter."
msgstr ""

msgid "The first three parameters are now positional-only."
msgstr ""

msgid "Example:"
msgstr "Contoh:"

msgid ""
">>> import hashlib\n"
">>> def md5sum(t):\n"
"...     return hashlib.md5(t).hexdigest()\n"
">>> con = sqlite3.connect(\":memory:\")\n"
">>> con.create_function(\"md5\", 1, md5sum)\n"
">>> for row in con.execute(\"SELECT md5(?)\", (b\"foo\",)):\n"
"...     print(row)\n"
"('acbd18db4cc2f85cedef654fccc4a4d8',)\n"
">>> con.close()"
msgstr ""

msgid "Create or remove a user-defined SQL aggregate function."
msgstr ""

msgid "The name of the SQL aggregate function."
msgstr ""

msgid ""
"The number of arguments the SQL aggregate function can accept. If ``-1``, it "
"may take any number of arguments."
msgstr ""

msgid ""
"A class must implement the following methods:  * ``step()``: Add a row to "
"the aggregate. * ``finalize()``: Return the final result of the aggregate "
"as   :ref:`a type natively supported by SQLite <sqlite3-types>`.  The number "
"of arguments that the ``step()`` method must accept is controlled by "
"*n_arg*.  Set to ``None`` to remove an existing SQL aggregate function."
msgstr ""

msgid "A class must implement the following methods:"
msgstr ""

msgid "``step()``: Add a row to the aggregate."
msgstr ""

msgid ""
"``finalize()``: Return the final result of the aggregate as :ref:`a type "
"natively supported by SQLite <sqlite3-types>`."
msgstr ""

msgid ""
"The number of arguments that the ``step()`` method must accept is controlled "
"by *n_arg*."
msgstr ""

msgid "Set to ``None`` to remove an existing SQL aggregate function."
msgstr ""

msgid "All three parameters are now positional-only."
msgstr ""

msgid ""
"class MySum:\n"
"    def __init__(self):\n"
"        self.count = 0\n"
"\n"
"    def step(self, value):\n"
"        self.count += value\n"
"\n"
"    def finalize(self):\n"
"        return self.count\n"
"\n"
"con = sqlite3.connect(\":memory:\")\n"
"con.create_aggregate(\"mysum\", 1, MySum)\n"
"cur = con.execute(\"CREATE TABLE test(i)\")\n"
"cur.execute(\"INSERT INTO test(i) VALUES(1)\")\n"
"cur.execute(\"INSERT INTO test(i) VALUES(2)\")\n"
"cur.execute(\"SELECT mysum(i) FROM test\")\n"
"print(cur.fetchone()[0])\n"
"\n"
"con.close()"
msgstr ""

msgid "Create or remove a user-defined aggregate window function."
msgstr ""

msgid "The name of the SQL aggregate window function to create or remove."
msgstr ""

msgid ""
"The number of arguments the SQL aggregate window function can accept. If "
"``-1``, it may take any number of arguments."
msgstr ""

msgid ""
"A class that must implement the following methods:  * ``step()``: Add a row "
"to the current window. * ``value()``: Return the current value of the "
"aggregate. * ``inverse()``: Remove a row from the current window. * "
"``finalize()``: Return the final result of the aggregate as   :ref:`a type "
"natively supported by SQLite <sqlite3-types>`.  The number of arguments that "
"the ``step()`` and ``value()`` methods must accept is controlled by "
"*num_params*.  Set to ``None`` to remove an existing SQL aggregate window "
"function."
msgstr ""

msgid "A class that must implement the following methods:"
msgstr ""

msgid "``step()``: Add a row to the current window."
msgstr ""

msgid "``value()``: Return the current value of the aggregate."
msgstr ""

msgid "``inverse()``: Remove a row from the current window."
msgstr ""

msgid ""
"The number of arguments that the ``step()`` and ``value()`` methods must "
"accept is controlled by *num_params*."
msgstr ""

msgid "Set to ``None`` to remove an existing SQL aggregate window function."
msgstr ""

msgid ""
"If used with a version of SQLite older than 3.25.0, which does not support "
"aggregate window functions."
msgstr ""

msgid ""
"# Example taken from https://www.sqlite.org/windowfunctions.html#udfwinfunc\n"
"class WindowSumInt:\n"
"    def __init__(self):\n"
"        self.count = 0\n"
"\n"
"    def step(self, value):\n"
"        \"\"\"Add a row to the current window.\"\"\"\n"
"        self.count += value\n"
"\n"
"    def value(self):\n"
"        \"\"\"Return the current value of the aggregate.\"\"\"\n"
"        return self.count\n"
"\n"
"    def inverse(self, value):\n"
"        \"\"\"Remove a row from the current window.\"\"\"\n"
"        self.count -= value\n"
"\n"
"    def finalize(self):\n"
"        \"\"\"Return the final value of the aggregate.\n"
"\n"
"        Any clean-up actions should be placed here.\n"
"        \"\"\"\n"
"        return self.count\n"
"\n"
"\n"
"con = sqlite3.connect(\":memory:\")\n"
"cur = con.execute(\"CREATE TABLE test(x, y)\")\n"
"values = [\n"
"    (\"a\", 4),\n"
"    (\"b\", 5),\n"
"    (\"c\", 3),\n"
"    (\"d\", 8),\n"
"    (\"e\", 1),\n"
"]\n"
"cur.executemany(\"INSERT INTO test VALUES(?, ?)\", values)\n"
"con.create_window_function(\"sumint\", 1, WindowSumInt)\n"
"cur.execute(\"\"\"\n"
"    SELECT x, sumint(y) OVER (\n"
"        ORDER BY x ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING\n"
"    ) AS sum_y\n"
"    FROM test ORDER BY x\n"
"\"\"\")\n"
"print(cur.fetchall())\n"
"con.close()"
msgstr ""

msgid ""
"Create a collation named *name* using the collating function *callable*. "
"*callable* is passed two :class:`string <str>` arguments, and it should "
"return an :class:`integer <int>`:"
msgstr ""

msgid "``1`` if the first is ordered higher than the second"
msgstr ""

msgid "``-1`` if the first is ordered lower than the second"
msgstr ""

msgid "``0`` if they are ordered equal"
msgstr ""

msgid "The following example shows a reverse sorting collation:"
msgstr ""

msgid ""
"def collate_reverse(string1, string2):\n"
"    if string1 == string2:\n"
"        return 0\n"
"    elif string1 < string2:\n"
"        return 1\n"
"    else:\n"
"        return -1\n"
"\n"
"con = sqlite3.connect(\":memory:\")\n"
"con.create_collation(\"reverse\", collate_reverse)\n"
"\n"
"cur = con.execute(\"CREATE TABLE test(x)\")\n"
"cur.executemany(\"INSERT INTO test(x) VALUES(?)\", [(\"a\",), (\"b\",)])\n"
"cur.execute(\"SELECT x FROM test ORDER BY x COLLATE reverse\")\n"
"for row in cur:\n"
"    print(row)\n"
"con.close()"
msgstr ""

msgid "Remove a collation function by setting *callable* to ``None``."
msgstr ""

msgid ""
"The collation name can contain any Unicode character.  Earlier, only ASCII "
"characters were allowed."
msgstr ""

msgid ""
"Call this method from a different thread to abort any queries that might be "
"executing on the connection. Aborted queries will raise "
"an :exc:`OperationalError`."
msgstr ""

msgid ""
"Register :term:`callable` *authorizer_callback* to be invoked for each "
"attempt to access a column of a table in the database. The callback should "
"return one of :const:`SQLITE_OK`, :const:`SQLITE_DENY`, "
"or :const:`SQLITE_IGNORE` to signal how access to the column should be "
"handled by the underlying SQLite library."
msgstr ""

msgid ""
"The first argument to the callback signifies what kind of operation is to be "
"authorized. The second and third argument will be arguments or ``None`` "
"depending on the first argument. The 4th argument is the name of the "
"database (\"main\", \"temp\", etc.) if applicable. The 5th argument is the "
"name of the inner-most trigger or view that is responsible for the access "
"attempt or ``None`` if this access attempt is directly from input SQL code."
msgstr ""

msgid ""
"Please consult the SQLite documentation about the possible values for the "
"first argument and the meaning of the second and third argument depending on "
"the first one. All necessary constants are available in the :mod:`!sqlite3` "
"module."
msgstr ""

msgid "Passing ``None`` as *authorizer_callback* will disable the authorizer."
msgstr ""

msgid "Added support for disabling the authorizer using ``None``."
msgstr ""

msgid "The only parameter is now positional-only."
msgstr ""

msgid ""
"Register :term:`callable` *progress_handler* to be invoked for every *n* "
"instructions of the SQLite virtual machine. This is useful if you want to "
"get called from SQLite during long-running operations, for example to update "
"a GUI."
msgstr ""

msgid ""
"If you want to clear any previously installed progress handler, call the "
"method with ``None`` for *progress_handler*."
msgstr ""

msgid ""
"Returning a non-zero value from the handler function will terminate the "
"currently executing query and cause it to raise a :exc:`DatabaseError` "
"exception."
msgstr ""

msgid "The first parameter is now positional-only."
msgstr ""

msgid ""
"Register :term:`callable` *trace_callback* to be invoked for each SQL "
"statement that is actually executed by the SQLite backend."
msgstr ""

msgid ""
"The only argument passed to the callback is the statement (as :class:`str`) "
"that is being executed. The return value of the callback is ignored. Note "
"that the backend does not only run statements passed to "
"the :meth:`Cursor.execute` methods.  Other sources include "
"the :ref:`transaction management <sqlite3-controlling-transactions>` of "
"the :mod:`!sqlite3` module and the execution of triggers defined in the "
"current database."
msgstr ""

msgid "Passing ``None`` as *trace_callback* will disable the trace callback."
msgstr ""

msgid ""
"Exceptions raised in the trace callback are not propagated. As a development "
"and debugging aid, use :meth:`~sqlite3.enable_callback_tracebacks` to enable "
"printing tracebacks from exceptions raised in the trace callback."
msgstr ""

msgid ""
"Enable the SQLite engine to load SQLite extensions from shared libraries if "
"*enabled* is ``True``; else, disallow loading SQLite extensions. SQLite "
"extensions can define new functions, aggregates or whole new virtual table "
"implementations.  One well-known extension is the fulltext-search extension "
"distributed with SQLite."
msgstr ""

msgid ""
"The :mod:`!sqlite3` module is not built with loadable extension support by "
"default, because some platforms (notably macOS) have SQLite libraries which "
"are compiled without this feature. To get loadable extension support, you "
"must pass the :option:`--enable-loadable-sqlite-extensions` option "
"to :program:`configure`."
msgstr ""

msgid ""
"Raises an :ref:`auditing event <auditing>` ``sqlite3.enable_load_extension`` "
"with arguments ``connection``, ``enabled``."
msgstr ""

msgid "Added the ``sqlite3.enable_load_extension`` auditing event."
msgstr ""

msgid ""
"con.enable_load_extension(True)\n"
"\n"
"# Load the fulltext search extension\n"
"con.execute(\"select load_extension('./fts3.so')\")\n"
"\n"
"# alternatively you can load the extension using an API call:\n"
"# con.load_extension(\"./fts3.so\")\n"
"\n"
"# disable extension loading again\n"
"con.enable_load_extension(False)\n"
"\n"
"# example from SQLite wiki\n"
"con.execute(\"CREATE VIRTUAL TABLE recipe USING fts3(name, ingredients)\")\n"
"con.executescript(\"\"\"\n"
"    INSERT INTO recipe (name, ingredients) VALUES('broccoli stew', 'broccoli "
"peppers cheese tomatoes');\n"
"    INSERT INTO recipe (name, ingredients) VALUES('pumpkin stew', 'pumpkin "
"onions garlic celery');\n"
"    INSERT INTO recipe (name, ingredients) VALUES('broccoli pie', 'broccoli "
"cheese onions flour');\n"
"    INSERT INTO recipe (name, ingredients) VALUES('pumpkin pie', 'pumpkin "
"sugar flour butter');\n"
"    \"\"\")\n"
"for row in con.execute(\"SELECT rowid, name, ingredients FROM recipe WHERE "
"name MATCH 'pie'\"):\n"
"    print(row)"
msgstr ""

msgid ""
"Load an SQLite extension from a shared library. Enable extension loading "
"with :meth:`enable_load_extension` before calling this method."
msgstr ""

msgid "The path to the SQLite extension."
msgstr ""

msgid ""
"Entry point name. If ``None`` (the default), SQLite will come up with an "
"entry point name of its own; see the SQLite docs `Loading an Extension`_ for "
"details."
msgstr ""

msgid ""
"Raises an :ref:`auditing event <auditing>` ``sqlite3.load_extension`` with "
"arguments ``connection``, ``path``."
msgstr ""

msgid "Added the ``sqlite3.load_extension`` auditing event."
msgstr ""

msgid "Added the *entrypoint* parameter."
msgstr ""

msgid ""
"Return an :term:`iterator` to dump the database as SQL source code. Useful "
"when saving an in-memory database for later restoration. Similar to the "
"``.dump`` command in the :program:`sqlite3` shell."
msgstr ""

msgid ""
"An optional ``LIKE`` pattern for database objects to dump, e.g. "
"``prefix_%``. If ``None`` (the default), all database objects will be "
"included."
msgstr ""

msgid ""
"# Convert file example.db to SQL dump file dump.sql\n"
"con = sqlite3.connect('example.db')\n"
"with open('dump.sql', 'w') as f:\n"
"    for line in con.iterdump():\n"
"        f.write('%s\\n' % line)\n"
"con.close()"
msgstr ""

msgid ":ref:`sqlite3-howto-encoding`"
msgstr ""

msgid "Added the *filter* parameter."
msgstr ""

msgid "Create a backup of an SQLite database."
msgstr ""

msgid ""
"Works even if the database is being accessed by other clients or "
"concurrently by the same connection."
msgstr ""

msgid "The database connection to save the backup to."
msgstr ""

msgid ""
"The number of pages to copy at a time. If equal to or less than ``0``, the "
"entire database is copied in a single step. Defaults to ``-1``."
msgstr ""

msgid ""
"If set to a :term:`callable`, it is invoked with three integer arguments for "
"every backup iteration: the *status* of the last iteration, the *remaining* "
"number of pages still to be copied, and the *total* number of pages. "
"Defaults to ``None``."
msgstr ""

msgid ""
"The name of the database to back up. Either ``\"main\"`` (the default) for "
"the main database, ``\"temp\"`` for the temporary database, or the name of a "
"custom database as attached using the ``ATTACH DATABASE`` SQL statement."
msgstr ""

msgid ""
"The number of seconds to sleep between successive attempts to back up "
"remaining pages."
msgstr ""

msgid "Example 1, copy an existing database into another:"
msgstr ""

msgid ""
"def progress(status, remaining, total):\n"
"    print(f'Copied {total-remaining} of {total} pages...')\n"
"\n"
"src = sqlite3.connect('example.db')\n"
"dst = sqlite3.connect('backup.db')\n"
"with dst:\n"
"    src.backup(dst, pages=1, progress=progress)\n"
"dst.close()\n"
"src.close()"
msgstr ""

msgid "Example 2, copy an existing database into a transient copy:"
msgstr ""

msgid ""
"src = sqlite3.connect('example.db')\n"
"dst = sqlite3.connect(':memory:')\n"
"src.backup(dst)\n"
"dst.close()\n"
"src.close()"
msgstr ""

msgid "Get a connection runtime limit."
msgstr ""

msgid "The `SQLite limit category`_ to be queried."
msgstr ""

msgid "If *category* is not recognised by the underlying SQLite library."
msgstr ""

msgid ""
"Example, query the maximum length of an SQL statement "
"for :class:`Connection` ``con`` (the default is 1000000000):"
msgstr ""

msgid ""
">>> con.getlimit(sqlite3.SQLITE_LIMIT_SQL_LENGTH)\n"
"1000000000"
msgstr ""

msgid ""
"Set a connection runtime limit. Attempts to increase a limit above its hard "
"upper bound are silently truncated to the hard upper bound. Regardless of "
"whether or not the limit was changed, the prior value of the limit is "
"returned."
msgstr ""

msgid "The `SQLite limit category`_ to be set."
msgstr ""

msgid ""
"The value of the new limit. If negative, the current limit is unchanged."
msgstr ""

msgid ""
"Example, limit the number of attached databases to 1 for :class:`Connection` "
"``con`` (the default limit is 10):"
msgstr ""

msgid ""
">>> con.setlimit(sqlite3.SQLITE_LIMIT_ATTACHED, 1)\n"
"10\n"
">>> con.getlimit(sqlite3.SQLITE_LIMIT_ATTACHED)\n"
"1"
msgstr ""

msgid "Query a boolean connection configuration option."
msgstr ""

msgid "A :ref:`SQLITE_DBCONFIG code <sqlite3-dbconfig-constants>`."
msgstr ""

msgid "Set a boolean connection configuration option."
msgstr ""

msgid ""
"``True`` if the configuration option should be enabled (default); ``False`` "
"if it should be disabled."
msgstr ""

msgid ""
"Serialize a database into a :class:`bytes` object.  For an ordinary on-disk "
"database file, the serialization is just a copy of the disk file.  For an in-"
"memory database or a \"temp\" database, the serialization is the same "
"sequence of bytes which would be written to disk if that database were "
"backed up to disk."
msgstr ""

msgid "The database name to be serialized. Defaults to ``\"main\"``."
msgstr ""

msgid ""
"This method is only available if the underlying SQLite library has the "
"serialize API."
msgstr ""

msgid ""
"Deserialize a :meth:`serialized <serialize>` database into "
"a :class:`Connection`. This method causes the database connection to "
"disconnect from database *name*, and reopen *name* as an in-memory database "
"based on the serialization contained in *data*."
msgstr ""

msgid "A serialized database."
msgstr ""

msgid "The database name to deserialize into. Defaults to ``\"main\"``."
msgstr ""

msgid ""
"If the database connection is currently involved in a read transaction or a "
"backup operation."
msgstr ""

msgid "If *data* does not contain a valid SQLite database."
msgstr ""

msgid "If :func:`len(data) <len>` is larger than ``2**63 - 1``."
msgstr ""

msgid ""
"This method is only available if the underlying SQLite library has the "
"deserialize API."
msgstr ""

msgid ""
"This attribute controls :pep:`249`-compliant transaction behaviour. :attr:`!"
"autocommit` has three allowed values:"
msgstr ""

msgid ""
"``False``: Select :pep:`249`-compliant transaction behaviour, implying "
"that :mod:`!sqlite3` ensures a transaction is always open. "
"Use :meth:`commit` and :meth:`rollback` to close transactions."
msgstr ""

msgid "This is the recommended value of :attr:`!autocommit`."
msgstr ""

msgid ""
"``True``: Use SQLite's `autocommit mode`_. :meth:`commit` "
"and :meth:`rollback` have no effect in this mode."
msgstr ""

msgid ""
":data:`LEGACY_TRANSACTION_CONTROL`: Pre-Python 3.12 (non-:pep:`249`-"
"compliant) transaction control. See :attr:`isolation_level` for more details."
msgstr ""

msgid "This is currently the default value of :attr:`!autocommit`."
msgstr ""

msgid ""
"Changing :attr:`!autocommit` to ``False`` will open a new transaction, and "
"changing it to ``True`` will commit any pending transaction."
msgstr ""

msgid "See :ref:`sqlite3-transaction-control-autocommit` for more details."
msgstr ""

msgid ""
"The :attr:`isolation_level` attribute has no effect "
"unless :attr:`autocommit` is :data:`LEGACY_TRANSACTION_CONTROL`."
msgstr ""

msgid ""
"This read-only attribute corresponds to the low-level SQLite `autocommit "
"mode`_."
msgstr ""

msgid ""
"``True`` if a transaction is active (there are uncommitted changes), "
"``False`` otherwise."
msgstr ""

msgid ""
"Controls the :ref:`legacy transaction handling mode <sqlite3-transaction-"
"control-isolation-level>` of :mod:`!sqlite3`. If set to ``None``, "
"transactions are never implicitly opened. If set to one of ``\"DEFERRED\"``, "
"``\"IMMEDIATE\"``, or ``\"EXCLUSIVE\"``, corresponding to the underlying "
"`SQLite transaction behaviour`_, :ref:`implicit transaction management "
"<sqlite3-transaction-control-isolation-level>` is performed."
msgstr ""

msgid ""
"If not overridden by the *isolation_level* parameter of :func:`connect`, the "
"default is ``\"\"``, which is an alias for ``\"DEFERRED\"``."
msgstr ""

msgid ""
"Using :attr:`autocommit` to control transaction handling is recommended over "
"using :attr:`!isolation_level`. :attr:`!isolation_level` has no effect "
"unless :attr:`autocommit` is set to :data:`LEGACY_TRANSACTION_CONTROL` (the "
"default)."
msgstr ""

msgid ""
"The initial :attr:`~Cursor.row_factory` for :class:`Cursor` objects created "
"from this connection. Assigning to this attribute does not affect "
"the :attr:`!row_factory` of existing cursors belonging to this connection, "
"only new ones. Is ``None`` by default, meaning each row is returned as "
"a :class:`tuple`."
msgstr ""

msgid "See :ref:`sqlite3-howto-row-factory` for more details."
msgstr ""

msgid "Deleting the ``row_factory`` attribute is no longer allowed."
msgstr ""

msgid ""
"A :term:`callable` that accepts a :class:`bytes` parameter and returns a "
"text representation of it. The callable is invoked for SQLite values with "
"the ``TEXT`` data type. By default, this attribute is set to :class:`str`."
msgstr ""

msgid "See :ref:`sqlite3-howto-encoding` for more details."
msgstr ""

msgid "Deleting the ``text_factory`` attribute is no longer allowed."
msgstr ""

msgid ""
"Return the total number of database rows that have been modified, inserted, "
"or deleted since the database connection was opened."
msgstr ""

msgid "Cursor objects"
msgstr ""

msgid ""
"A ``Cursor`` object represents a `database cursor`_ which is used to execute "
"SQL statements, and manage the context of a fetch operation. Cursors are "
"created using :meth:`Connection.cursor`, or by using any of "
"the :ref:`connection shortcut methods <sqlite3-connection-shortcuts>`."
msgstr ""

msgid ""
"Cursor objects are :term:`iterators <iterator>`, meaning that if "
"you :meth:`~Cursor.execute` a ``SELECT`` query, you can simply iterate over "
"the cursor to fetch the resulting rows:"
msgstr ""

msgid ""
"for row in cur.execute(\"SELECT t FROM data\"):\n"
"    print(row)"
msgstr ""

msgid "A :class:`Cursor` instance has the following attributes and methods."
msgstr ""

msgid ""
"Execute a single SQL statement, optionally binding Python values "
"using :ref:`placeholders <sqlite3-placeholders>`."
msgstr ""

msgid "A single SQL statement."
msgstr ""

msgid ""
"Python values to bind to placeholders in *sql*. A :class:`!dict` if named "
"placeholders are used. A :term:`!sequence` if unnamed placeholders are used. "
"See :ref:`sqlite3-placeholders`."
msgstr ""

msgid ""
"When *sql* contains more than one SQL statement. When :ref:`named "
"placeholders <sqlite3-placeholders>` are used and *parameters* is a sequence "
"instead of a :class:`dict`."
msgstr ""

msgid ""
"If :attr:`~Connection.autocommit` "
"is :data:`LEGACY_TRANSACTION_CONTROL`, :attr:`~Connection.isolation_level` "
"is not ``None``, *sql* is an ``INSERT``, ``UPDATE``, ``DELETE``, or "
"``REPLACE`` statement, and there is no open transaction, a transaction is "
"implicitly opened before executing *sql*."
msgstr ""

msgid ""
":exc:`ProgrammingError` is emitted if :ref:`named placeholders <sqlite3-"
"placeholders>` are used and *parameters* is a sequence instead of "
"a :class:`dict`."
msgstr ""

msgid "Use :meth:`executescript` to execute multiple SQL statements."
msgstr ""

msgid ""
"For every item in *parameters*, repeatedly execute the :ref:`parameterized "
"<sqlite3-placeholders>` :abbr:`DML (Data Manipulation Language)` SQL "
"statement *sql*."
msgstr ""

msgid "Uses the same implicit transaction handling as :meth:`~Cursor.execute`."
msgstr ""

msgid "A single SQL DML statement."
msgstr ""

msgid ""
"An :term:`!iterable` of parameters to bind with the placeholders in *sql*. "
"See :ref:`sqlite3-placeholders`."
msgstr ""

msgid ""
"When *sql* contains more than one SQL statement or is not a DML statement, "
"When :ref:`named placeholders <sqlite3-placeholders>` are used and the items "
"in *parameters* are sequences instead of :class:`dict`\\s."
msgstr ""

msgid ""
"rows = [\n"
"    (\"row1\",),\n"
"    (\"row2\",),\n"
"]\n"
"# cur is an sqlite3.Cursor object\n"
"cur.executemany(\"INSERT INTO data VALUES(?)\", rows)"
msgstr ""

msgid ""
"Any resulting rows are discarded, including DML statements with `RETURNING "
"clauses`_."
msgstr ""

msgid ""
":exc:`ProgrammingError` is emitted if :ref:`named placeholders <sqlite3-"
"placeholders>` are used and the items in *parameters* are sequences instead "
"of :class:`dict`\\s."
msgstr ""

msgid ""
"Execute the SQL statements in *sql_script*. If "
"the :attr:`~Connection.autocommit` is :data:`LEGACY_TRANSACTION_CONTROL` and "
"there is a pending transaction, an implicit ``COMMIT`` statement is executed "
"first. No other implicit transaction control is performed; any transaction "
"control must be added to *sql_script*."
msgstr ""

msgid "*sql_script* must be a :class:`string <str>`."
msgstr ""

msgid ""
"# cur is an sqlite3.Cursor object\n"
"cur.executescript(\"\"\"\n"
"    BEGIN;\n"
"    CREATE TABLE person(firstname, lastname, age);\n"
"    CREATE TABLE book(title, author, published);\n"
"    CREATE TABLE publisher(name, address);\n"
"    COMMIT;\n"
"\"\"\")"
msgstr ""

msgid ""
"If :attr:`~Cursor.row_factory` is ``None``, return the next row query result "
"set as a :class:`tuple`. Else, pass it to the row factory and return its "
"result. Return ``None`` if no more data is available."
msgstr ""

msgid ""
"Return the next set of rows of a query result as a :class:`list`. Return an "
"empty list if no more rows are available."
msgstr ""

msgid ""
"The number of rows to fetch per call is specified by the *size* parameter. "
"If *size* is not given, :attr:`arraysize` determines the number of rows to "
"be fetched. If fewer than *size* rows are available, as many rows as are "
"available are returned."
msgstr ""

msgid ""
"Note there are performance considerations involved with the *size* "
"parameter. For optimal performance, it is usually best to use the arraysize "
"attribute. If the *size* parameter is used, then it is best for it to retain "
"the same value from one :meth:`fetchmany` call to the next."
msgstr ""

msgid "Negative *size* values are rejected by raising :exc:`ValueError`."
msgstr ""

msgid ""
"Return all (remaining) rows of a query result as a :class:`list`. Return an "
"empty list if no rows are available. Note that the :attr:`arraysize` "
"attribute can affect the performance of this operation."
msgstr ""

msgid "Close the cursor now (rather than whenever ``__del__`` is called)."
msgstr ""

msgid ""
"The cursor will be unusable from this point forward; "
"a :exc:`ProgrammingError` exception will be raised if any operation is "
"attempted with the cursor."
msgstr ""

msgid "Required by the DB-API. Does nothing in :mod:`!sqlite3`."
msgstr ""

msgid ""
"Read/write attribute that controls the number of rows returned "
"by :meth:`fetchmany`. The default value is 1 which means a single row would "
"be fetched per call."
msgstr ""

msgid "Negative values are rejected by raising :exc:`ValueError`."
msgstr ""

msgid ""
"Read-only attribute that provides the SQLite database :class:`Connection` "
"belonging to the cursor.  A :class:`Cursor` object created by "
"calling :meth:`con.cursor() <Connection.cursor>` will have "
"a :attr:`connection` attribute that refers to *con*:"
msgstr ""

msgid ""
">>> con = sqlite3.connect(\":memory:\")\n"
">>> cur = con.cursor()\n"
">>> cur.connection == con\n"
"True\n"
">>> con.close()"
msgstr ""

msgid ""
"Read-only attribute that provides the column names of the last query. To "
"remain compatible with the Python DB API, it returns a 7-tuple for each "
"column where the last six items of each tuple are ``None``."
msgstr ""

msgid "It is set for ``SELECT`` statements without any matching rows as well."
msgstr ""

msgid ""
"Read-only attribute that provides the row id of the last inserted row. It is "
"only updated after successful ``INSERT`` or ``REPLACE`` statements using "
"the :meth:`execute` method.  For other statements, after :meth:`executemany` "
"or :meth:`executescript`, or if the insertion failed, the value of "
"``lastrowid`` is left unchanged.  The initial value of ``lastrowid`` is "
"``None``."
msgstr ""

msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded."
msgstr ""

msgid "Added support for the ``REPLACE`` statement."
msgstr ""

msgid ""
"Read-only attribute that provides the number of modified rows for "
"``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements; is ``-1`` "
"for other statements, including :abbr:`CTE (Common Table Expression)` "
"queries. It is only updated by the :meth:`execute` and :meth:`executemany` "
"methods, after the statement has run to completion. This means that any "
"resulting rows must be fetched in order for :attr:`!rowcount` to be updated."
msgstr ""

msgid ""
"Control how a row fetched from this :class:`!Cursor` is represented. If "
"``None``, a row is represented as a :class:`tuple`. Can be set to the "
"included :class:`sqlite3.Row`; or a :term:`callable` that accepts two "
"arguments, a :class:`Cursor` object and the :class:`!tuple` of row values, "
"and returns a custom object representing an SQLite row."
msgstr ""

msgid ""
"Defaults to what :attr:`Connection.row_factory` was set to when the :class:`!"
"Cursor` was created. Assigning to this attribute does not "
"affect :attr:`Connection.row_factory` of the parent connection."
msgstr ""

msgid "Row objects"
msgstr ""

msgid ""
"A :class:`!Row` instance serves as a highly "
"optimized :attr:`~Connection.row_factory` for :class:`Connection` objects. "
"It supports iteration, equality testing, :func:`len`, and :term:`mapping` "
"access by column name and index."
msgstr ""

msgid ""
"Two :class:`!Row` objects compare equal if they have identical column names "
"and values."
msgstr ""

msgid ""
"Return a :class:`list` of column names as :class:`strings <str>`. "
"Immediately after a query, it is the first member of each tuple "
"in :attr:`Cursor.description`."
msgstr ""

msgid "Added support of slicing."
msgstr "Menambahkan dukungan dari pemotongan."

msgid "Blob objects"
msgstr ""

msgid ""
"A :class:`Blob` instance is a :term:`file-like object` that can read and "
"write data in an SQLite :abbr:`BLOB (Binary Large OBject)`. "
"Call :func:`len(blob) <len>` to get the size (number of bytes) of the blob. "
"Use indices and :term:`slices <slice>` for direct access to the blob data."
msgstr ""

msgid ""
"Use the :class:`Blob` as a :term:`context manager` to ensure that the blob "
"handle is closed after use."
msgstr ""

msgid ""
"con = sqlite3.connect(\":memory:\")\n"
"con.execute(\"CREATE TABLE test(blob_col blob)\")\n"
"con.execute(\"INSERT INTO test(blob_col) VALUES(zeroblob(13))\")\n"
"\n"
"# Write to our blob, using two write operations:\n"
"with con.blobopen(\"test\", \"blob_col\", 1) as blob:\n"
"    blob.write(b\"hello, \")\n"
"    blob.write(b\"world.\")\n"
"    # Modify the first and last bytes of our blob\n"
"    blob[0] = ord(\"H\")\n"
"    blob[-1] = ord(\"!\")\n"
"\n"
"# Read the contents of our blob\n"
"with con.blobopen(\"test\", \"blob_col\", 1) as blob:\n"
"    greeting = blob.read()\n"
"\n"
"print(greeting)  # outputs \"b'Hello, world!'\"\n"
"con.close()"
msgstr ""

msgid "Close the blob."
msgstr ""

msgid ""
"The blob will be unusable from this point onward.  "
"An :class:`~sqlite3.Error` (or subclass) exception will be raised if any "
"further operation is attempted with the blob."
msgstr ""

msgid ""
"Read *length* bytes of data from the blob at the current offset position. If "
"the end of the blob is reached, the data up to :abbr:`EOF (End of File)` "
"will be returned.  When *length* is not specified, or is "
"negative, :meth:`~Blob.read` will read until the end of the blob."
msgstr ""

msgid ""
"Write *data* to the blob at the current offset.  This function cannot change "
"the blob length.  Writing beyond the end of the blob will "
"raise :exc:`ValueError`."
msgstr ""

msgid "Return the current access position of the blob."
msgstr ""

msgid ""
"Set the current access position of the blob to *offset*.  The *origin* "
"argument defaults to :const:`os.SEEK_SET` (absolute blob positioning). Other "
"values for *origin* are :const:`os.SEEK_CUR` (seek relative to the current "
"position) and :const:`os.SEEK_END` (seek relative to the blob’s end)."
msgstr ""

msgid "PrepareProtocol objects"
msgstr ""

msgid ""
"The PrepareProtocol type's single purpose is to act as a :pep:`246` style "
"adaption protocol for objects that can :ref:`adapt themselves <sqlite3-"
"conform>` to :ref:`native SQLite types <sqlite3-types>`."
msgstr ""

msgid "Exceptions"
msgstr "Pengecualian"

msgid "The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`)."
msgstr ""

msgid ""
"This exception is not currently raised by the :mod:`!sqlite3` module, but "
"may be raised by applications using :mod:`!sqlite3`, for example if a user-"
"defined function truncates data while inserting. ``Warning`` is a subclass "
"of :exc:`Exception`."
msgstr ""

msgid ""
"The base class of the other exceptions in this module. Use this to catch all "
"errors with one single :keyword:`except` statement. ``Error`` is a subclass "
"of :exc:`Exception`."
msgstr ""

msgid ""
"If the exception originated from within the SQLite library, the following "
"two attributes are added to the exception:"
msgstr ""

msgid ""
"The numeric error code from the `SQLite API <https://sqlite.org/"
"rescode.html>`_"
msgstr ""

msgid ""
"The symbolic name of the numeric error code from the `SQLite API <https://"
"sqlite.org/rescode.html>`_"
msgstr ""

msgid ""
"Exception raised for misuse of the low-level SQLite C API. In other words, "
"if this exception is raised, it probably indicates a bug in the :mod:`!"
"sqlite3` module. ``InterfaceError`` is a subclass of :exc:`Error`."
msgstr ""

msgid ""
"Exception raised for errors that are related to the database. This serves as "
"the base exception for several types of database errors. It is only raised "
"implicitly through the specialised subclasses. ``DatabaseError`` is a "
"subclass of :exc:`Error`."
msgstr ""

msgid ""
"Exception raised for errors caused by problems with the processed data, like "
"numeric values out of range, and strings which are too long. ``DataError`` "
"is a subclass of :exc:`DatabaseError`."
msgstr ""

msgid ""
"Exception raised for errors that are related to the database's operation, "
"and not necessarily under the control of the programmer. For example, the "
"database path is not found, or a transaction could not be processed. "
"``OperationalError`` is a subclass of :exc:`DatabaseError`."
msgstr ""

msgid ""
"Exception raised when the relational integrity of the database is affected, "
"e.g. a foreign key check fails.  It is a subclass of :exc:`DatabaseError`."
msgstr ""

msgid ""
"Exception raised when SQLite encounters an internal error. If this is "
"raised, it may indicate that there is a problem with the runtime SQLite "
"library. ``InternalError`` is a subclass of :exc:`DatabaseError`."
msgstr ""

msgid ""
"Exception raised for :mod:`!sqlite3` API programming errors, for example "
"supplying the wrong number of bindings to a query, or trying to operate on a "
"closed :class:`Connection`. ``ProgrammingError`` is a subclass "
"of :exc:`DatabaseError`."
msgstr ""

msgid ""
"Exception raised in case a method or database API is not supported by the "
"underlying SQLite library. For example, setting *deterministic* to ``True`` "
"in :meth:`~Connection.create_function`, if the underlying SQLite library "
"does not support deterministic functions. ``NotSupportedError`` is a "
"subclass of :exc:`DatabaseError`."
msgstr ""

msgid "SQLite and Python types"
msgstr "SQLite dan tipe Python"

msgid ""
"SQLite natively supports the following types: ``NULL``, ``INTEGER``, "
"``REAL``, ``TEXT``, ``BLOB``."
msgstr ""

msgid ""
"The following Python types can thus be sent to SQLite without any problem:"
msgstr ""

msgid "Python type"
msgstr "tipe Python"

msgid "SQLite type"
msgstr "tipe SQLite"

msgid "``None``"
msgstr ""

msgid "``NULL``"
msgstr "``NULL``"

msgid ":class:`int`"
msgstr ":class:`int`"

msgid "``INTEGER``"
msgstr "``INTEGER``"

msgid ":class:`float`"
msgstr ":class:`float`"

msgid "``REAL``"
msgstr "``REAL``"

msgid ":class:`str`"
msgstr ":class:`str`"

msgid "``TEXT``"
msgstr "``TEXT``"

msgid ":class:`bytes`"
msgstr ":class:`bytes`"

msgid "``BLOB``"
msgstr "``BLOB``"

msgid "This is how SQLite types are converted to Python types by default:"
msgstr ""

msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default"
msgstr ""

msgid ""
"The type system of the :mod:`!sqlite3` module is extensible in two ways: you "
"can store additional Python types in an SQLite database via :ref:`object "
"adapters <sqlite3-adapters>`, and you can let the :mod:`!sqlite3` module "
"convert SQLite types to Python types via :ref:`converters <sqlite3-"
"converters>`."
msgstr ""

msgid "Default adapters and converters (deprecated)"
msgstr ""

msgid ""
"The default adapters and converters are deprecated as of Python 3.12. "
"Instead, use the :ref:`sqlite3-adapter-converter-recipes` and tailor them to "
"your needs."
msgstr ""

msgid "The deprecated default adapters and converters consist of:"
msgstr ""

msgid ""
"An adapter for :class:`datetime.date` objects to :class:`strings <str>` in "
"`ISO 8601`_ format."
msgstr ""

msgid ""
"An adapter for :class:`datetime.datetime` objects to strings in ISO 8601 "
"format."
msgstr ""

msgid ""
"A converter for :ref:`declared <sqlite3-converters>` \"date\" types "
"to :class:`datetime.date` objects."
msgstr ""

msgid ""
"A converter for declared \"timestamp\" types to :class:`datetime.datetime` "
"objects. Fractional parts will be truncated to 6 digits (microsecond "
"precision)."
msgstr ""

msgid ""
"The default \"timestamp\" converter ignores UTC offsets in the database and "
"always returns a naive :class:`datetime.datetime` object. To preserve UTC "
"offsets in timestamps, either leave converters disabled, or register an "
"offset-aware converter with :func:`register_converter`."
msgstr ""

msgid "Command-line interface"
msgstr ""

msgid ""
"The :mod:`!sqlite3` module can be invoked as a script, using the "
"interpreter's :option:`-m` switch, in order to provide a simple SQLite "
"shell. The argument signature is as follows::"
msgstr ""

msgid "python -m sqlite3 [-h] [-v] [filename] [sql]"
msgstr ""

msgid "Type ``.quit`` or CTRL-D to exit the shell."
msgstr ""

msgid "Print CLI help."
msgstr ""

msgid "Print underlying SQLite library version."
msgstr ""

msgid "How-to guides"
msgstr ""

msgid "How to use placeholders to bind values in SQL queries"
msgstr ""

msgid ""
"SQL operations usually need to use values from Python variables. However, "
"beware of using Python's string operations to assemble queries, as they are "
"vulnerable to `SQL injection attacks`_. For example, an attacker can simply "
"close the single quote and inject ``OR TRUE`` to select all rows::"
msgstr ""

msgid ""
">>> # Never do this -- insecure!\n"
">>> symbol = input()\n"
"' OR TRUE; --\n"
">>> sql = \"SELECT * FROM stocks WHERE symbol = '%s'\" % symbol\n"
">>> print(sql)\n"
"SELECT * FROM stocks WHERE symbol = '' OR TRUE; --'\n"
">>> cur.execute(sql)"
msgstr ""

msgid ""
"Instead, use the DB-API's parameter substitution. To insert a variable into "
"a query string, use a placeholder in the string, and substitute the actual "
"values into the query by providing them as a :class:`tuple` of values to the "
"second argument of the cursor's :meth:`~Cursor.execute` method."
msgstr ""

msgid ""
"An SQL statement may use one of two kinds of placeholders: question marks "
"(qmark style) or named placeholders (named style). For the qmark style, "
"*parameters* must be a :term:`sequence` whose length must match the number "
"of placeholders, or a :exc:`ProgrammingError` is raised. For the named "
"style, *parameters* must be an instance of a :class:`dict` (or a subclass), "
"which must contain keys for all named parameters; any extra items are "
"ignored. Here's an example of both styles:"
msgstr ""

msgid ""
"con = sqlite3.connect(\":memory:\")\n"
"cur = con.execute(\"CREATE TABLE lang(name, first_appeared)\")\n"
"\n"
"# This is the named style used with executemany():\n"
"data = (\n"
"    {\"name\": \"C\", \"year\": 1972},\n"
"    {\"name\": \"Fortran\", \"year\": 1957},\n"
"    {\"name\": \"Python\", \"year\": 1991},\n"
"    {\"name\": \"Go\", \"year\": 2009},\n"
")\n"
"cur.executemany(\"INSERT INTO lang VALUES(:name, :year)\", data)\n"
"\n"
"# This is the qmark style used in a SELECT query:\n"
"params = (1972,)\n"
"cur.execute(\"SELECT * FROM lang WHERE first_appeared = ?\", params)\n"
"print(cur.fetchall())\n"
"con.close()"
msgstr ""

msgid ""
":pep:`249` numeric placeholders are *not* supported. If used, they will be "
"interpreted as named placeholders."
msgstr ""

msgid "How to adapt custom Python types to SQLite values"
msgstr ""

msgid ""
"SQLite supports only a limited set of data types natively. To store custom "
"Python types in SQLite databases, *adapt* them to one of the :ref:`Python "
"types SQLite natively understands <sqlite3-types>`."
msgstr ""

msgid ""
"There are two ways to adapt Python objects to SQLite types: letting your "
"object adapt itself, or using an *adapter callable*. The latter will take "
"precedence above the former. For a library that exports a custom type, it "
"may make sense to enable that type to adapt itself. As an application "
"developer, it may make more sense to take direct control by registering "
"custom adapter functions."
msgstr ""

msgid "How to write adaptable objects"
msgstr ""

msgid ""
"Suppose we have a :class:`!Point` class that represents a pair of "
"coordinates, ``x`` and ``y``, in a Cartesian coordinate system. The "
"coordinate pair will be stored as a text string in the database, using a "
"semicolon to separate the coordinates. This can be implemented by adding a "
"``__conform__(self, protocol)`` method which returns the adapted value. The "
"object passed to *protocol* will be of type :class:`PrepareProtocol`."
msgstr ""

msgid ""
"class Point:\n"
"    def __init__(self, x, y):\n"
"        self.x, self.y = x, y\n"
"\n"
"    def __conform__(self, protocol):\n"
"        if protocol is sqlite3.PrepareProtocol:\n"
"            return f\"{self.x};{self.y}\"\n"
"\n"
"con = sqlite3.connect(\":memory:\")\n"
"cur = con.cursor()\n"
"\n"
"cur.execute(\"SELECT ?\", (Point(4.0, -3.2),))\n"
"print(cur.fetchone()[0])\n"
"con.close()"
msgstr ""

msgid "How to register adapter callables"
msgstr ""

msgid ""
"The other possibility is to create a function that converts the Python "
"object to an SQLite-compatible type. This function can then be registered "
"using :func:`register_adapter`."
msgstr ""

msgid ""
"class Point:\n"
"    def __init__(self, x, y):\n"
"        self.x, self.y = x, y\n"
"\n"
"def adapt_point(point):\n"
"    return f\"{point.x};{point.y}\"\n"
"\n"
"sqlite3.register_adapter(Point, adapt_point)\n"
"\n"
"con = sqlite3.connect(\":memory:\")\n"
"cur = con.cursor()\n"
"\n"
"cur.execute(\"SELECT ?\", (Point(1.0, 2.5),))\n"
"print(cur.fetchone()[0])\n"
"con.close()"
msgstr ""

msgid "How to convert SQLite values to custom Python types"
msgstr ""

msgid ""
"Writing an adapter lets you convert *from* custom Python types *to* SQLite "
"values. To be able to convert *from* SQLite values *to* custom Python types, "
"we use *converters*."
msgstr ""

msgid ""
"Let's go back to the :class:`!Point` class. We stored the x and y "
"coordinates separated via semicolons as strings in SQLite."
msgstr ""

msgid ""
"First, we'll define a converter function that accepts the string as a "
"parameter and constructs a :class:`!Point` object from it."
msgstr ""

msgid ""
"Converter functions are **always** passed a :class:`bytes` object, no matter "
"the underlying SQLite data type."
msgstr ""

msgid ""
"def convert_point(s):\n"
"    x, y = map(float, s.split(b\";\"))\n"
"    return Point(x, y)"
msgstr ""

msgid ""
"We now need to tell :mod:`!sqlite3` when it should convert a given SQLite "
"value. This is done when connecting to a database, using the *detect_types* "
"parameter of :func:`connect`. There are three options:"
msgstr ""

msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`"
msgstr ""

msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`"
msgstr ""

msgid ""
"Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | "
"sqlite3.PARSE_COLNAMES``. Column names take precedence over declared types."
msgstr ""

msgid "The following example illustrates the implicit and explicit approaches:"
msgstr ""

msgid ""
"class Point:\n"
"    def __init__(self, x, y):\n"
"        self.x, self.y = x, y\n"
"\n"
"    def __repr__(self):\n"
"        return f\"Point({self.x}, {self.y})\"\n"
"\n"
"def adapt_point(point):\n"
"    return f\"{point.x};{point.y}\"\n"
"\n"
"def convert_point(s):\n"
"    x, y = list(map(float, s.split(b\";\")))\n"
"    return Point(x, y)\n"
"\n"
"# Register the adapter and converter\n"
"sqlite3.register_adapter(Point, adapt_point)\n"
"sqlite3.register_converter(\"point\", convert_point)\n"
"\n"
"# 1) Parse using declared types\n"
"p = Point(4.0, -3.2)\n"
"con = sqlite3.connect(\":memory:\", detect_types=sqlite3.PARSE_DECLTYPES)\n"
"cur = con.execute(\"CREATE TABLE test(p point)\")\n"
"\n"
"cur.execute(\"INSERT INTO test(p) VALUES(?)\", (p,))\n"
"cur.execute(\"SELECT p FROM test\")\n"
"print(\"with declared types:\", cur.fetchone()[0])\n"
"cur.close()\n"
"con.close()\n"
"\n"
"# 2) Parse using column names\n"
"con = sqlite3.connect(\":memory:\", detect_types=sqlite3.PARSE_COLNAMES)\n"
"cur = con.execute(\"CREATE TABLE test(p)\")\n"
"\n"
"cur.execute(\"INSERT INTO test(p) VALUES(?)\", (p,))\n"
"cur.execute('SELECT p AS \"p [point]\" FROM test')\n"
"print(\"with column names:\", cur.fetchone()[0])\n"
"cur.close()\n"
"con.close()"
msgstr ""

msgid "Adapter and converter recipes"
msgstr ""

msgid "This section shows recipes for common adapters and converters."
msgstr ""

msgid ""
"import datetime as dt\n"
"import sqlite3\n"
"\n"
"def adapt_date_iso(val):\n"
"    \"\"\"Adapt datetime.date to ISO 8601 date.\"\"\"\n"
"    return val.isoformat()\n"
"\n"
"def adapt_datetime_iso(val):\n"
"    \"\"\"Adapt datetime.datetime to timezone-naive ISO 8601 date.\"\"\"\n"
"    return val.replace(tzinfo=None).isoformat()\n"
"\n"
"def adapt_datetime_epoch(val):\n"
"    \"\"\"Adapt datetime.datetime to Unix timestamp.\"\"\"\n"
"    return int(val.timestamp())\n"
"\n"
"sqlite3.register_adapter(dt.date, adapt_date_iso)\n"
"sqlite3.register_adapter(dt.datetime, adapt_datetime_iso)\n"
"sqlite3.register_adapter(dt.datetime, adapt_datetime_epoch)\n"
"\n"
"def convert_date(val):\n"
"    \"\"\"Convert ISO 8601 date to datetime.date object.\"\"\"\n"
"    return dt.date.fromisoformat(val.decode())\n"
"\n"
"def convert_datetime(val):\n"
"    \"\"\"Convert ISO 8601 datetime to datetime.datetime object.\"\"\"\n"
"    return dt.datetime.fromisoformat(val.decode())\n"
"\n"
"def convert_timestamp(val):\n"
"    \"\"\"Convert Unix epoch timestamp to datetime.datetime object.\"\"\"\n"
"    return dt.datetime.fromtimestamp(int(val))\n"
"\n"
"sqlite3.register_converter(\"date\", convert_date)\n"
"sqlite3.register_converter(\"datetime\", convert_datetime)\n"
"sqlite3.register_converter(\"timestamp\", convert_timestamp)"
msgstr ""

msgid "How to use connection shortcut methods"
msgstr ""

msgid ""
"Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, "
"and :meth:`~Connection.executescript` methods of the :class:`Connection` "
"class, your code can be written more concisely because you don't have to "
"create the (often superfluous) :class:`Cursor` objects explicitly. Instead, "
"the :class:`Cursor` objects are created implicitly and these shortcut "
"methods return the cursor objects. This way, you can execute a ``SELECT`` "
"statement and iterate over it directly using only a single call on "
"the :class:`Connection` object."
msgstr ""

msgid ""
"# Create and fill the table.\n"
"con = sqlite3.connect(\":memory:\")\n"
"con.execute(\"CREATE TABLE lang(name, first_appeared)\")\n"
"data = [\n"
"    (\"C++\", 1985),\n"
"    (\"Objective-C\", 1984),\n"
"]\n"
"con.executemany(\"INSERT INTO lang(name, first_appeared) VALUES(?, ?)\", "
"data)\n"
"\n"
"# Print the table contents\n"
"for row in con.execute(\"SELECT name, first_appeared FROM lang\"):\n"
"    print(row)\n"
"\n"
"print(\"I just deleted\", con.execute(\"DELETE FROM lang\").rowcount, "
"\"rows\")\n"
"\n"
"# close() is not a shortcut method and it's not called automatically;\n"
"# the connection object should be closed manually\n"
"con.close()"
msgstr ""

msgid "How to use the connection context manager"
msgstr ""

msgid ""
"A :class:`Connection` object can be used as a context manager that "
"automatically commits or rolls back open transactions when leaving the body "
"of the context manager. If the body of the :keyword:`with` statement "
"finishes without exceptions, the transaction is committed. If this commit "
"fails, or if the body of the ``with`` statement raises an uncaught "
"exception, the transaction is rolled back. If :attr:`~Connection.autocommit` "
"is ``False``, a new transaction is implicitly opened after committing or "
"rolling back."
msgstr ""

msgid ""
"If there is no open transaction upon leaving the body of the ``with`` "
"statement, or if :attr:`~Connection.autocommit` is ``True``, the context "
"manager does nothing."
msgstr ""

msgid ""
"The context manager neither implicitly opens a new transaction nor closes "
"the connection. If you need a closing context manager, consider "
"using :meth:`contextlib.closing`."
msgstr ""

msgid ""
"con = sqlite3.connect(\":memory:\")\n"
"con.execute(\"CREATE TABLE lang(id INTEGER PRIMARY KEY, name VARCHAR UNIQUE)"
"\")\n"
"\n"
"# Successful, con.commit() is called automatically afterwards\n"
"with con:\n"
"    con.execute(\"INSERT INTO lang(name) VALUES(?)\", (\"Python\",))\n"
"\n"
"# con.rollback() is called after the with block finishes with an exception,\n"
"# the exception is still raised and must be caught\n"
"try:\n"
"    with con:\n"
"        con.execute(\"INSERT INTO lang(name) VALUES(?)\", (\"Python\",))\n"
"except sqlite3.IntegrityError:\n"
"    print(\"couldn't add Python twice\")\n"
"\n"
"# Connection object used as context manager only commits or rollbacks "
"transactions,\n"
"# so the connection object should be closed manually\n"
"con.close()"
msgstr ""

msgid "How to work with SQLite URIs"
msgstr ""

msgid "Some useful URI tricks include:"
msgstr ""

msgid "Open a database in read-only mode:"
msgstr ""

msgid ""
">>> con = sqlite3.connect(\"file:tutorial.db?mode=ro\", uri=True)\n"
">>> con.execute(\"CREATE TABLE readonly(data)\")\n"
"Traceback (most recent call last):\n"
"OperationalError: attempt to write a readonly database\n"
">>> con.close()"
msgstr ""

msgid ""
"Do not implicitly create a new database file if it does not already exist; "
"will raise :exc:`~sqlite3.OperationalError` if unable to create a new file:"
msgstr ""

msgid ""
">>> con = sqlite3.connect(\"file:nosuchdb.db?mode=rw\", uri=True)\n"
"Traceback (most recent call last):\n"
"OperationalError: unable to open database file"
msgstr ""

msgid "Create a shared named in-memory database:"
msgstr ""

msgid ""
"db = \"file:mem1?mode=memory&cache=shared\"\n"
"con1 = sqlite3.connect(db, uri=True)\n"
"con2 = sqlite3.connect(db, uri=True)\n"
"with con1:\n"
"    con1.execute(\"CREATE TABLE shared(data)\")\n"
"    con1.execute(\"INSERT INTO shared VALUES(28)\")\n"
"res = con2.execute(\"SELECT data FROM shared\")\n"
"assert res.fetchone() == (28,)\n"
"\n"
"con1.close()\n"
"con2.close()"
msgstr ""

msgid ""
"More information about this feature, including a list of parameters, can be "
"found in the `SQLite URI documentation`_."
msgstr ""

msgid "How to create and use row factories"
msgstr ""

msgid ""
"By default, :mod:`!sqlite3` represents each row as a :class:`tuple`. If "
"a :class:`!tuple` does not suit your needs, you can use "
"the :class:`sqlite3.Row` class or a custom :attr:`~Cursor.row_factory`."
msgstr ""

msgid ""
"While :attr:`!row_factory` exists as an attribute both on "
"the :class:`Cursor` and the :class:`Connection`, it is recommended to "
"set :class:`Connection.row_factory`, so all cursors created from the "
"connection will use the same row factory."
msgstr ""

msgid ""
":class:`!Row` provides indexed and case-insensitive named access to columns, "
"with minimal memory overhead and performance impact over a :class:`!tuple`. "
"To use :class:`!Row` as a row factory, assign it to the :attr:`!row_factory` "
"attribute:"
msgstr ""

msgid ""
">>> con = sqlite3.connect(\":memory:\")\n"
">>> con.row_factory = sqlite3.Row"
msgstr ""

msgid "Queries now return :class:`!Row` objects:"
msgstr ""

msgid ""
">>> res = con.execute(\"SELECT 'Earth' AS name, 6378 AS radius\")\n"
">>> row = res.fetchone()\n"
">>> row.keys()\n"
"['name', 'radius']\n"
">>> row[0]         # Access by index.\n"
"'Earth'\n"
">>> row[\"name\"]    # Access by name.\n"
"'Earth'\n"
">>> row[\"RADIUS\"]  # Column names are case-insensitive.\n"
"6378\n"
">>> con.close()"
msgstr ""

msgid ""
"The ``FROM`` clause can be omitted in the ``SELECT`` statement, as in the "
"above example. In such cases, SQLite returns a single row with columns "
"defined by expressions, e.g. literals, with the given aliases ``expr AS "
"alias``."
msgstr ""

msgid ""
"You can create a custom :attr:`~Cursor.row_factory` that returns each row as "
"a :class:`dict`, with column names mapped to values:"
msgstr ""

msgid ""
"def dict_factory(cursor, row):\n"
"    fields = [column[0] for column in cursor.description]\n"
"    return {key: value for key, value in zip(fields, row)}"
msgstr ""

msgid ""
"Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`:"
msgstr ""

msgid ""
">>> con = sqlite3.connect(\":memory:\")\n"
">>> con.row_factory = dict_factory\n"
">>> for row in con.execute(\"SELECT 1 AS a, 2 AS b\"):\n"
"...     print(row)\n"
"{'a': 1, 'b': 2}\n"
">>> con.close()"
msgstr ""

msgid "The following row factory returns a :term:`named tuple`:"
msgstr ""

msgid ""
"from collections import namedtuple\n"
"\n"
"def namedtuple_factory(cursor, row):\n"
"    fields = [column[0] for column in cursor.description]\n"
"    cls = namedtuple(\"Row\", fields)\n"
"    return cls._make(row)"
msgstr ""

msgid ":func:`!namedtuple_factory` can be used as follows:"
msgstr ""

msgid ""
">>> con = sqlite3.connect(\":memory:\")\n"
">>> con.row_factory = namedtuple_factory\n"
">>> cur = con.execute(\"SELECT 1 AS a, 2 AS b\")\n"
">>> row = cur.fetchone()\n"
">>> row\n"
"Row(a=1, b=2)\n"
">>> row[0]  # Indexed access.\n"
"1\n"
">>> row.b   # Attribute access.\n"
"2\n"
">>> con.close()"
msgstr ""

msgid ""
"With some adjustments, the above recipe can be adapted to use "
"a :class:`~dataclasses.dataclass`, or any other custom class, instead of "
"a :class:`~collections.namedtuple`."
msgstr ""

msgid "How to handle non-UTF-8 text encodings"
msgstr ""

msgid ""
"By default, :mod:`!sqlite3` uses :class:`str` to adapt SQLite values with "
"the ``TEXT`` data type. This works well for UTF-8 encoded text, but it might "
"fail for other encodings and invalid UTF-8. You can use a "
"custom :attr:`~Connection.text_factory` to handle such cases."
msgstr ""

msgid ""
"Because of SQLite's `flexible typing`_, it is not uncommon to encounter "
"table columns with the ``TEXT`` data type containing non-UTF-8 encodings, or "
"even arbitrary data. To demonstrate, let's assume we have a database with "
"ISO-8859-2 (Latin-2) encoded text, for example a table of Czech-English "
"dictionary entries. Assuming we now have a :class:`Connection` "
"instance :py:data:`!con` connected to this database, we can decode the "
"Latin-2 encoded text using this :attr:`~Connection.text_factory`:"
msgstr ""

msgid "con.text_factory = lambda data: str(data, encoding=\"latin2\")"
msgstr ""

msgid ""
"For invalid UTF-8 or arbitrary data in stored in ``TEXT`` table columns, you "
"can use the following technique, borrowed from the :ref:`unicode-howto`:"
msgstr ""

msgid "con.text_factory = lambda data: str(data, errors=\"surrogateescape\")"
msgstr ""

msgid ""
"The :mod:`!sqlite3` module API does not support strings containing "
"surrogates."
msgstr ""

msgid ":ref:`unicode-howto`"
msgstr ""

msgid "Explanation"
msgstr ""

msgid "Transaction control"
msgstr ""

msgid ""
":mod:`!sqlite3` offers multiple methods of controlling whether, when and how "
"database transactions are opened and closed. :ref:`sqlite3-transaction-"
"control-autocommit` is recommended, while :ref:`sqlite3-transaction-control-"
"isolation-level` retains the pre-Python 3.12 behaviour."
msgstr ""

msgid "Transaction control via the ``autocommit`` attribute"
msgstr ""

msgid ""
"The recommended way of controlling transaction behaviour is through "
"the :attr:`Connection.autocommit` attribute, which should preferably be set "
"using the *autocommit* parameter of :func:`connect`."
msgstr ""

msgid ""
"It is suggested to set *autocommit* to ``False``, which implies :pep:`249`-"
"compliant transaction control. This means:"
msgstr ""

msgid ""
":mod:`!sqlite3` ensures that a transaction is always open, "
"so :func:`connect`, :meth:`Connection.commit`, "
"and :meth:`Connection.rollback` will implicitly open a new transaction "
"(immediately after closing the pending one, for the latter two). :mod:`!"
"sqlite3` uses ``BEGIN DEFERRED`` statements when opening transactions."
msgstr ""

msgid "Transactions should be committed explicitly using :meth:`!commit`."
msgstr ""

msgid "Transactions should be rolled back explicitly using :meth:`!rollback`."
msgstr ""

msgid ""
"An implicit rollback is performed if the database "
"is :meth:`~Connection.close`-ed with pending changes."
msgstr ""

msgid ""
"Set *autocommit* to ``True`` to enable SQLite's `autocommit mode`_. In this "
"mode, :meth:`Connection.commit` and :meth:`Connection.rollback` have no "
"effect. Note that SQLite's autocommit mode is distinct from the :pep:`249`-"
"compliant :attr:`Connection.autocommit` attribute; "
"use :attr:`Connection.in_transaction` to query the low-level SQLite "
"autocommit mode."
msgstr ""

msgid ""
"Set *autocommit* to :data:`LEGACY_TRANSACTION_CONTROL` to leave transaction "
"control behaviour to the :attr:`Connection.isolation_level` attribute. "
"See :ref:`sqlite3-transaction-control-isolation-level` for more information."
msgstr ""

msgid "Transaction control via the ``isolation_level`` attribute"
msgstr ""

msgid ""
"The recommended way of controlling transactions is via "
"the :attr:`~Connection.autocommit` attribute. See :ref:`sqlite3-transaction-"
"control-autocommit`."
msgstr ""

msgid ""
"If :attr:`Connection.autocommit` is set "
"to :data:`LEGACY_TRANSACTION_CONTROL` (the default), transaction behaviour "
"is controlled using the :attr:`Connection.isolation_level` attribute. "
"Otherwise, :attr:`!isolation_level` has no effect."
msgstr ""

msgid ""
"If the connection attribute :attr:`~Connection.isolation_level` is not "
"``None``, new transactions are implicitly opened "
"before :meth:`~Cursor.execute` and :meth:`~Cursor.executemany` executes "
"``INSERT``, ``UPDATE``, ``DELETE``, or ``REPLACE`` statements; for other "
"statements, no implicit transaction handling is performed. Use "
"the :meth:`~Connection.commit` and :meth:`~Connection.rollback` methods to "
"respectively commit and roll back pending transactions. You can choose the "
"underlying `SQLite transaction behaviour`_ — that is, whether and what type "
"of ``BEGIN`` statements :mod:`!sqlite3` implicitly executes – via "
"the :attr:`~Connection.isolation_level` attribute."
msgstr ""

msgid ""
"If :attr:`~Connection.isolation_level` is set to ``None``, no transactions "
"are implicitly opened at all. This leaves the underlying SQLite library in "
"`autocommit mode`_, but also allows the user to perform their own "
"transaction handling using explicit SQL statements. The underlying SQLite "
"library autocommit mode can be queried using "
"the :attr:`~Connection.in_transaction` attribute."
msgstr ""

msgid ""
"The :meth:`~Cursor.executescript` method implicitly commits any pending "
"transaction before execution of the given SQL script, regardless of the "
"value of :attr:`~Connection.isolation_level`."
msgstr ""

msgid ""
":mod:`!sqlite3` used to implicitly commit an open transaction before DDL "
"statements.  This is no longer the case."
msgstr ""

msgid ""
"The recommended way of controlling transactions is now via "
"the :attr:`~Connection.autocommit` attribute."
msgstr ""

msgid "? (question mark)"
msgstr ""

msgid "in SQL statements"
msgstr ""

msgid ": (colon)"
msgstr ""
