Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
5d7c290b
Kaydet (Commit)
5d7c290b
authored
Haz 13, 2006
tarafından
Gerhard Häring
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Updated documentation for pysqlite 2.3.0 API.
üst
5dc3e3f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
3 deletions
+38
-3
libsqlite3.tex
Doc/lib/libsqlite3.tex
+38
-3
No files found.
Doc/lib/libsqlite3.tex
Dosyayı görüntüle @
5d7c290b
...
...
@@ -195,6 +195,14 @@ This can be used to build a shell for SQLite, like in the following example:
\verbatiminput
{
sqlite3/complete
_
statement.py
}
\end{funcdesc}
\begin{funcdesc}
{}
enable
_
callback
_
tracebacks
{
flag
}
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
\var
{
flag
}
as True. Afterwards, you will get
tracebacks from callbacks on
\code
{
sys.stderr
}
. Use
\constant
{
False
}
to disable
the feature again.
\end{funcdesc}
\subsection
{
Connection Objects
\label
{
sqlite3-Connection-Objects
}}
A
\class
{
Connection
}
instance has the following attributes and methods:
...
...
@@ -237,8 +245,7 @@ of parameters the function accepts, and \var{func} is a Python callable that is
called as SQL function.
The function can return any of the types supported by SQLite: unicode, str,
int, long, float, buffer and None. Exceptions in the function are ignored and
they are handled as if the function returned None.
int, long, float, buffer and None.
Example:
...
...
@@ -254,7 +261,7 @@ number of parameters \var{num_params}, and a \code{finalize} method which
will return the final result of the aggregate.
The
\code
{
finalize
}
method can return any of the types supported by SQLite:
unicode, str, int, long, float, buffer and None.
Any exceptions are ignored.
unicode, str, int, long, float, buffer and None.
Example:
...
...
@@ -283,6 +290,34 @@ To remove a collation, call \code{create_collation} with None as callable:
\end{verbatim}
\end{methoddesc}
\begin{methoddesc}
{
interrupt
}{}
You can call this method from a different thread to abort any queries that
might be executing on the connection. The query will then abort and the caller
will get an exception.
\end{methoddesc}
\begin{methoddesc}
{
set
_
authorizer
}{
authorizer
_
callback
}
This routine registers a callback. The callback is invoked for each attempt to
access a column of a table in the database. The callback should return
\constant
{
SQLITE
_
OK
}
if access is allowed,
\constant
{
SQLITE
_
DENY
}
if the entire
SQL statement should be aborted with an error and
\constant
{
SQLITE
_
IGNORE
}
if
the column should be treated as a NULL value. These constants are available in
the
\module
{
sqlite3
}
module.
The first argument to the callback signifies what kind of operation is to be
authorized. The second and third argument will be arguments or
\constant
{
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
\constant
{
None
}
if this access attempt is directly from input SQL code.
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
\module
{
sqlite3
}
module.
\end{methoddesc}
\begin{memberdesc}
{
row
_
factory
}
You can change this attribute to a callable that accepts the cursor and
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment