Skip to content

Commit

Permalink
Release v1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pcisar committed Nov 30, 2016
1 parent 8782c5f commit 468bb6f
Show file tree
Hide file tree
Showing 27 changed files with 862 additions and 2,441 deletions.
2 changes: 1 addition & 1 deletion PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: fdb
Version: 1.5.1
Version: 1.6
Summary: Firebird RDBMS bindings for Python.
Home-page: http://www.firebirdsql.org/en/devel-python-driver/
Author: Pavel Cisar
Expand Down
7 changes: 7 additions & 0 deletions docs/_sources/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Changelog
#########

* `Version 1.6.1`_ (30.11.2016)
* `Version 1.6`_ (30.3.2016)
* `Version 1.5.1`_ (22.2.2016)
* `Version 1.5`_ (7.1.2016)
Expand Down Expand Up @@ -31,6 +32,12 @@ Changelog
* `Version 0.7.1`_ (31. 1. 2012)
* `Version 0.7`_ (21. 12. 2011)

Version 1.6.1
=============

- (PYFB-68) - Add support for isc_spb_sts_table option
- (PYFB-67) - Cursor fails after use with executemany(). ReferenceError: weakly-referenced object no longer exists

Version 1.6
===========

Expand Down
22 changes: 3 additions & 19 deletions docs/_sources/differences-from-kdb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@ used.
Distributed transactions
========================

Support for :ref:`Distributed Transactions <distributed_transactions>` works slightly
differently than in KDB. FDB uses :class:`~fdb.ConnectionGroup` class like KDB with the same
interface, but DT is not bound to main transaction of individual connections managed by group.
That means that :class:`~fdb.Cursor` instances obtained from :class:`~fdb.Connection` don't work in
DT if connection is part of ConnectionGroup, but work normally in connection context.
To get Cursor for specific connection that works in DT, use :meth:`fdb.ConnectionGroup.cursor()`
method and pass the connection as parameter. We believe that this arrangement is more
logical and flexible than KDB's way.
Support for :ref:`Distributed Transactions <distributed_transactions>` works slightly differently than in KDB. FDB uses :class:`~fdb.ConnectionGroup` class like KDB with the same interface, but DT is not bound to main transaction of individual connections managed by group. That means that :class:`~fdb.Cursor` instances obtained from :class:`~fdb.Connection` don't work in DT if connection is part of ConnectionGroup, but work normally in connection context. To get Cursor for specific connection that works in DT, use :meth:`fdb.ConnectionGroup.cursor()` method and pass the connection as parameter. We believe that this arrangement is more logical and flexible than KDB's way.

Transaction context for cursor objects depends on how cursor is obtained/created:

Expand Down Expand Up @@ -64,9 +57,7 @@ management) and anomalies (stream access when it's not required). Example:
blob_reader.close()

Whenever you use stream access to BLOB, FDB opens or creates the underlying BLOB
value as stream one. On input it means that true stream BLOB is created in database,
but on output it depends on how BLOB value was actually created. If BLOB was
created as stream one, you can use the seek method of BlobReader, but if it was
value as stream one. On input it means that true stream BLOB is created in database, but on output it depends on how BLOB value was actually created. If BLOB was created as stream one, you can use the seek method of BlobReader, but if it was
created as regular BLOB, any call to seek will raise an error::

SQLCODE: -685
Expand Down Expand Up @@ -98,14 +89,7 @@ instead fully materialized value via set_stream_blob() calls for each BLOB value
seek(), tell(), flush() (as noop) and close() methods. It does NOT support chunks()
method of KInterbasDB.BlobReader.

It is not strictly necessary to close BlobReader instances explicitly.
A BlobReader object will be automatically closed by its __del__ method when it
goes out of scope, or when its Connection, PreparedStatement closes,
whichever comes first. However, it is always a better idea to close resources
explicitly (via try...finally) than to rely on artifacts of the Python
implementation. You will also encounter errors if BLOB value was deleted from
database before BlobReader is closed, so the odds that this may happen are higher
if you do not close it explicitly.
It is not strictly necessary to close BlobReader instances explicitly. A BlobReader object will be automatically closed by its __del__ method when it goes out of scope, or when its Connection, PreparedStatement closes, whichever comes first. However, it is always a better idea to close resources explicitly (via try...finally) than to rely on artifacts of the Python implementation. You will also encounter errors if BLOB value was deleted from database before BlobReader is closed, so the odds that this may happen are higher if you do not close it explicitly.

Services API
============
Expand Down
53 changes: 12 additions & 41 deletions docs/_sources/getting-started.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ Getting Started with FDB
Installation
************

FDB is written as pure-Python module on top of Firebird client library (fbclient.so/dll) using ctypes_,
so *make sure you have Firebird client properly installed before you try to install FDB*, otherwise the
installation will fail. FDB supports Firebird version 2.0 and higher.
FDB is written as pure-Python module on top of Firebird client library (fbclient.so/dll) using ctypes_, so *make sure you have Firebird client properly installed before you try to install FDB*, otherwise the installation will fail. FDB supports Firebird version 2.0 and higher.

FDB is distributed as `setuptools`_ package, so you'll need setuptools or
`compatible package <http://pypi.python.org/pypi/distribute>`_ installed to
Expand Down Expand Up @@ -43,14 +41,9 @@ Download the source tarball, uncompress it, then run the install command::
Quick-start Guide
*****************

This brief tutorial aims to get the reader started by demonstrating
elementary usage of FDB. It is not a comprehensive Python
Database API tutorial, nor is it comprehensive in its coverage of
anything else.
This brief tutorial aims to get the reader started by demonstrating elementary usage of FDB. It is not a comprehensive Python Database API tutorial, nor is it comprehensive in its coverage of anything else.

The numerous advanced features of FDB are covered in another
section of this documentation, which is not in a tutorial format, though it
is replete with examples.
The numerous advanced features of FDB are covered in another section of this documentation, which is not in a tutorial format, though it is replete with examples.


Connecting to a Database
Expand Down Expand Up @@ -140,8 +133,7 @@ Sample output:

**Example 2**

Here's another trivial example that demonstrates various ways of
fetching a single row at a time from a `SELECT`-cursor:
Here's another trivial example that demonstrates various ways of fetching a single row at a time from a `SELECT`-cursor:

.. sourcecode:: python

Expand Down Expand Up @@ -183,8 +175,7 @@ Sample output:

**Example 3**

The following program is a simplistic table printer (applied in this
example to `languages`):
The following program is a simplistic table printer (applied in this example to `languages`):

.. sourcecode:: python

Expand Down Expand Up @@ -252,10 +243,7 @@ Let's insert more languages:
con.commit()


Note the use of a *parameterized* SQL statement above. When dealing
with repetitive statements, this is much faster and less error-prone
than assembling each SQL statement manually. (You can read more about
parameterized SQL statements in the section on :ref:`Prepared Statements <prepared-statements>`.)
Note the use of a *parameterized* SQL statement above. When dealing with repetitive statements, this is much faster and less error-prone than assembling each SQL statement manually. (You can read more about parameterized SQL statements in the section on :ref:`Prepared Statements <prepared-statements>`.)

After running Example 4, the table printer from Example 3 would print:

Expand All @@ -272,26 +260,13 @@ After running Example 4, the table printer from Example 3 would print:
Calling Stored Procedures
=========================

Firebird supports stored procedures written in a proprietary procedural
SQL language. Firebird stored procedures can have *input* parameters and/or
*output* parameters. Some databases support *input/output* parameters,
where the same parameter is used for both input and output; Firebird does
not support this.
Firebird supports stored procedures written in a proprietary procedural SQL language. Firebird stored procedures can have *input* parameters and/or *output* parameters. Some databases support *input/output* parameters, where the same parameter is used for both input and output; Firebird does not support this.

It is important to distinguish between procedures that *return a
result set* and procedures that *populate and return their output
parameters exactly once*. Conceptually, the latter "return their
output parameters" like a Python function, whereas the former "yield
result rows" like a Python generator.
It is important to distinguish between procedures that *return a result set* and procedures that *populate and return their output parameters exactly once*. Conceptually, the latter "return their output parameters" like a Python function, whereas the former "yield result rows" like a Python generator.

Firebird's *server-side* procedural SQL syntax makes no such distinction,
but *client-side* SQL code (and C API code) must. A result set is
retrieved from a stored procedure by `SELECT`ing from the procedure,
whereas output parameters are retrieved with an `EXECUTE PROCEDURE`
statement.
Firebird's *server-side* procedural SQL syntax makes no such distinction, but *client-side* SQL code (and C API code) must. A result set is retrieved from a stored procedure by `SELECT`ing from the procedure, whereas output parameters are retrieved with an `EXECUTE PROCEDURE` statement.

To *retrieve a result set* from a stored procedure with FDB,
use code such as this:
To *retrieve a result set* from a stored procedure with FDB, use code such as this:

.. sourcecode:: python

Expand All @@ -304,8 +279,7 @@ use code such as this:
con.commit() # If the procedure had any side effects, commit them.


To *execute* a stored procedure and *access its output parameters*,
use code such as this:
To *execute* a stored procedure and *access its output parameters*, use code such as this:

.. sourcecode:: python

Expand All @@ -318,7 +292,4 @@ use code such as this:
con.commit() # If the procedure had any side effects, commit them.


This latter is not very elegant; it would be preferable to access the
procedure's output parameters as the return value of
`Cursor.callproc()`. The Python DB API specification requires the
current behavior, however.
This latter is not very elegant; it would be preferable to access the procedure's output parameters as the return value of `Cursor.callproc()`. The Python DB API specification requires the current behavior, however.
22 changes: 6 additions & 16 deletions docs/_sources/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,12 @@ Welcome to FDB's documentation!
###############################

FDB is a `Python <http://python.org>`__ library package that
implements `Python Database API 2.0`-compliant support for the open source relational
database `Firebird® <http://www.firebirdsql.org>`__.
In addition to the minimal feature set of the standard Python DB API,
FDB also exposes nearly the entire native client API of the database engine.

FDB is free -- covered by a permissive BSD-style `license
<license.html>`__ that both commercial and noncommercial users should
find agreeable.

This documentation set is not a tutorial on Python, SQL, or Firebird;
rather, it is a topical presentation of FDB's feature set,
with example code to demonstrate basic usage patterns. For detailed
information about Firebird features, see the `Firebird documentation
<http://www.firebirdsql.org/index.php?op=doc>`__, and especially the excellent
`The Firebird Book <http://www.ibphoenix.com/products/books/firebird_book>`__
written by Helen Borrie and published by APress.
implements `Python Database API 2.0`-compliant support for the open source relational database `Firebird® <http://www.firebirdsql.org>`__.
In addition to the minimal feature set of the standard Python DB API, FDB also exposes nearly the entire native client API of the database engine.

FDB is free -- covered by a permissive BSD-style `license <license.html>`__ that both commercial and noncommercial users should find agreeable.

This documentation set is not a tutorial on Python, SQL, or Firebird; rather, it is a topical presentation of FDB's feature set, with example code to demonstrate basic usage patterns. For detailed information about Firebird features, see the `Firebird documentation <http://www.firebirdsql.org/index.php?op=doc>`__, and especially the excellent `The Firebird Book <http://www.ibphoenix.com/products/books/firebird_book>`__ written by Helen Borrie and published by APress.

Documentation Contents:
***********************
Expand Down

0 comments on commit 468bb6f

Please sign in to comment.