FAQ
NAME:
PySQLite - Extension module for SQLite databases.

DESCRIPTION:
A Python-DB API 2.0 compliant extension module that uses the SQLite
embedded SQL database. No external SQL server required. Think of
Gadfly, only faster.

SQLite is a powerful, embedded relational database in a compact C
library. It supports a large subset of SQL92, multiple tables and
indices, transactions, and triggers. Sources are uncopyrighted and
can be used for any purpose. More information can be found at
<http://www.hwaci.com/sw/sqlite/index.html>.

HOMEPAGE:
<http://pysqlite.sourceforge.net>

DOWNLOAD:
Source and Windows binary downloads are available at
<http://www.sourceforge.net/projects/pysqlite>

AUTHORS:
Gerhard H?ring <gerhard.haering at gmx.de>
Michael Owens <mike at mikesclutter.com>

LICENSE:
Python

NOTES:
The following are changes and enhancements since the last release:

IMPORTANT BACKWARDS INCOMPATIBLE CHANGE:
========================================

SQLite is typeless, that's why we had the special command
"pysqlite_pragma expected types = type1, type2, ..., typen" which was parsed
in the Python layer.

Of course, this isn't standard SQL so such code isn't portable to other DB-API
modules.

That's why I changed this mechanism. The new syntax is

-- types = type1, type2, ..., typen

Which is just a special SQL comment that other database backends will
cheerfully ignore.

On the Python side of things, Connection has now an attribute 'rowclass' that
is set to PgResultSet by default. This attribute is written in every new
cursor instance. rowclass == tuple is handled differently - nothing needs to
be done because the C layer already returns tuples. So with con.rowclass =
tuple you'll get a noticeable speed boost :-) The tuple thing doesn't handle
Python 2.1 yet, but I wonder if we should just discontinue support for
anything older than 2.2 in the first place.


NOT SO IMPORTANT CHANGES (FOR THE END USER)
===========================================

Lots of little changes, like Python 2.3 compatibility, fixes for the Debian
control files.

The type conversions and converters were moved from the Python layer into the
C layer. This was done so this is happening at *one* place.

- Moved exceptions from pysqlite_exceptions.py to _sqlite.c.
- Moved type codes from sqlite/constants/FIELD_TYPE.py to _sqlite.c
- Trimmed available type codes.
- Require SQLite version 2.5.6 or later.
- Always use "pragma show_datatypes=on"
- Made the type conversion actually work and fixed a potential strcpy-related
buffer overrun.
- In cursor.description, set all fields to None where we don't know anything
about (as the DB-API specification tells).
- Fixed sqlite_is_at_least_version.
- Renamed '_sqlite.enable_userfunction_debugging' to
'_sqlite.enable_callback_debugging', because it is now also usable for busy
callbacks.
- Make process_record cope with empty data. This occurs when PRAGMA
EMPTY_RESULT_CALLBACKS=ON was set by the user.
- Wrap sqlite_busy_handler and sqlite_busy_timeout.

Search Discussions

  • Bob X at Feb 11, 2003 at 9:36 pm
    Do I need to get SQLite seperately? Or does PySQLite have everything in the
    box?

    Bob
  • Richard Jones at Feb 11, 2003 at 10:36 pm

    On Wed, 12 Feb 2003 8:36 am, Bob X wrote:
    Do I need to get SQLite seperately? Or does PySQLite have everything in the
    box?
    Yes, you need to get sqlite separately. The good news is that it's trivial to
    install :)


    Richard
  • Gerhard Häring at Feb 11, 2003 at 10:36 pm

    * Bob X [2003-02-11 21:36 +0000]:
    Do I need to get SQLite seperately? Or does PySQLite have everything in the
    box?
    On Windows, you only need to download our binary installer - it's
    statically linked against SQLite.

    On Unix, you'll need to install SQLite first, then build PySQLite.

    Now if your Unix flavour is actually Linux and in particular Debian, you
    can build a package using "dpkg-buildpackage -rfakeroot" in the PySQLite
    source directory.

    I also maintain a FreeBSD package for PySQLite (and SQLite) that's in
    ports.

    If you're using a RPM-based Linux distribution, you can get a SQLite RPM
    from the SQLite homepage ...

    For date/time types, it's recommended you install mxDateTime too, but
    mxDateTime isn't required.

    Gerhard
    --
    Favourite database: http://www.postgresql.org/
    Favourite programming language: http://www.python.org/
    Combine the two: http://pypgsql.sf.net/
    Embedded database for Python: http://pysqlite.sf.net/
  • Bob X at Feb 11, 2003 at 11:55 pm
    "Richard Jones" <rjones at ekit-inc.com> wrote in message
    news:mailman.1045003283.27904.python-list at python.org...
    On Wed, 12 Feb 2003 8:36 am, Bob X wrote:
    Do I need to get SQLite seperately? Or does PySQLite have everything in
    the
    box?
    Yes, you need to get sqlite separately. The good news is that it's trivial to
    install :)
    Trivial in "it has an installer" or "just drop a DLL here"?
  • Richard Jones at Feb 12, 2003 at 12:19 am

    On Wed, 12 Feb 2003 10:55 am, Bob X wrote:
    "Richard Jones" <rjones at ekit-inc.com> wrote in message
    news:mailman.1045003283.27904.python-list at python.org...
    On Wed, 12 Feb 2003 8:36 am, Bob X wrote:
    Do I need to get SQLite seperately? Or does PySQLite have everything in
    the
    box?
    Yes, you need to get sqlite separately. The good news is that it's
    trivial to
    install :)
    Trivial in "it has an installer" or "just drop a DLL here"?
    You mention DLL - go to the pysqlite downloads page to find the windows
    installer.

    http://sourceforge.net/project/showfiles.php?group_idT058


    Richard
  • Jørgen Cederberg at Feb 13, 2003 at 7:24 am

    Gerhard ? wrote:
    * Bob X [2003-02-11 21:36 +0000]:
    Do I need to get SQLite seperately? Or does PySQLite have everything in the
    box?

    On Windows, you only need to download our binary installer - it's
    statically linked against SQLite.
    Where would I find this binary installer? I have searched the website
    and couldn't find it. It even states on the download page that "a
    Windows binary distribution is currently in the process of being developed".

    /Jorgen
  • Gerhard Häring at Feb 13, 2003 at 8:19 am

    J?rgen Cederberg wrote:
    Gerhard ? wrote:
    * Bob X [2003-02-11 21:36 +0000]:
    Do I need to get SQLite seperately? Or does PySQLite have
    everything in the box?
    On Windows, you only need to download our binary installer - it's
    statically linked against SQLite.
    Where would I find this binary installer?
    http://sourceforge.net/project/showfiles.php?group_idT058
    I have searched the website and couldn't find it. It even states on
    the download page that "a Windows binary distribution is currently
    in the process of being developed".
    Yeah, the web page is in need of being updated every year or so ;-) I
    changed that particular paragraph, though.

    -- Gerhard
  • Gerhard Haering at Feb 13, 2003 at 1:25 am

    * Gerhard H?ring [2003-02-11 14:06 +0000]:
    IMPORTANT BACKWARDS INCOMPATIBLE CHANGE:
    ========================================

    SQLite is typeless, that's why we had the special command
    "pysqlite_pragma expected types = type1, type2, ..., typen" which was parsed
    in the Python layer.

    Of course, this isn't standard SQL so such code isn't portable to other DB-API
    modules.

    That's why I changed this mechanism. The new syntax is

    -- types = type1, type2, ..., typen
    Sorry, typo here.

    The syntax is really

    -- types type1, ..., typen


    *without* the '='. My new parser for the "-- types" at the C level hardly does
    any error checking, so it will accept the first (wrong) form, but return None
    for that column, because it cannot find any type converter for the "= type1"
    type :-/

    -- Gerhard

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedFeb 11, '03 at 2:06p
activeFeb 13, '03 at 8:19a
posts9
users5
websitepython.org

People

Translate

site design / logo © 2022 Grokbase