Important
This is initial release of new “SweetBitter” driver generation.
During this (v2) generation FDB driver will undergo a transition from development centered around Python 2.7 / Firebird 2.x to development centered around Python 3 / Firebird 3. There are some backward incompatible changes between v2 and v1 generation, and you may expect some also between individual releases of second generation. To soften this bitter pill, the second generation will have new functionality, enhancements and optimalizations gradually added into each public release.
The second generation is also the last one that will directly support Python 2.7 and will be tested with Firebird 2.
The plan is to move forward with v3 generation (Python 3/Firebird 3+) as soon as v2 code base will become mature.
fdb.trace
), gstat output (fdb.gstat
) and server log (fdb.log
)fdb.utils.ObjectList
class for improved object collection manipulation.monitor
and schema
now use new fdb.utils.ObjectList
for collections of information objects.fdb.Connection.database_info()
and fdb.Transaction.transaction_info()
now distinguish between
text and binary strings with result_type code.fdb.Transaction.transaction_info()
and fdb.Connection.database_info()
now does not support value ‘s’ for string results as these converted strings to unicode in Python 3 which does not makes sense (it’s always binary data, at least partially). Instead new value ‘b’ is introduced for binary string results.schema
module, added classes fdb.utils.Visitable
and fdb.utils.Visitor
.fdb.schema.Schema.reload()
now takes as parameter numeric metadata category code(s) instead string name.local_backup()
and local_restore()
for details.fdb.schema.TableColumn.id
(RDB$FIELD_ID)fdb.BlobReader.get_info()
.Filter
and BackupHistory
in schema module.get_metadata_ddl()
.Connection
and
Transaction
, fixes and improvements to db_info()
and database_info()
).connect()
parameters: no_gc, no_db_triggers and no_linger.Connection
class.fdb.connect()
and fdb.create_database()
.In relation to PYFB-43 I had to make a backward incompatible change to event processing API. Starting from this version
EventConduit does not automatically starts collection of events upon creation, but it’s now necessary to call
begin()
method. To mitigate the inconvenience, EventConduit now supports context manager
protocol that ensures calls to begin() and close() via with statement.
In relation to PYFB-39 I have decided to drop support for implicitly cached and reused prepared statements. I never liked this feature as I think it’s a sneaky method how to put some performance to badly written applications that in worst case may lead to significant resource consumption on server side when developers are not only lazy but also stupid. It was implemented for the sake of compatibility with KInterbasDB.
This change has no impact on API, but may affect performance of your applications.
fdb.connect()
, fdb.create_database()
or fdb.load_api()
(which now supports optional specification of Firebird Client Library to load).version
and engine_version
added to fdb.services.Connection
fdb.schema
submodule extended with support for user privileges.fdb.services.User.load_information()
method to load information about user from server.fdb.ibase
content cleanup and additions.fdb.blr
submodule with BLR definitions.fdb.monitor
submodule for access to / work with monitoring tables.fdb.Connection.monitor
property for access to monitoring tables.fdb.schema.Schema.close()
and fdb.schema.Schema.bind()
.fdb.schema
submodule for access to / work with database metadata.fdb.utils
submodule with various helper classes and functions.fdb.Connection.schema
property for access to database schema.ConnectionWithSchema
connection class that provides more direct access
to database schema than Connection.fdb.Connection.firebird_version
, fdb.Connection.version
and
fdb.Connection.engine_version
properties.fdb.Connection.query_transaction
property. This is ReadOnly ReadCommitted transaction
that could be active indefinitely without blocking garbage collection. It’s used internally to query
metadata, but it’s generally useful.Optional PEP 249 (Python DB API 2.0) Extensions
Connection.Error, Connection.ProgrammingError, etc.
All exception classes defined by the DB API standard are exposed on the Connection objects as attributes (in addition to being available at module scope).
Cursor.connection
This read-only attribute return a reference to the Connection object on which the cursor was created.
Cursor.transaction read-only attribute returns a reference to the Transaction object on which the cursor was created.
Optimized wekref management, especially for PreparedStatement.
create_database now supports two methods for database screation. You can specify CREATE DATABASE statement (as before) or provide set of named database parameters (SQL statement is created automatically from them).
Functions connection and create_database now take optional keyword parameter connection_class to obtain instances of different class instead Connection.
Support for legacy (pre-2.5) shutdown mode with mode fdb.services.SHUT_LEGACY.
fdb.Cursor.executemany()
returns self, so it could be used directly as iterator.
Documentation inprovements.
Just bugfixes to make FDB work on P3K again.
And as always, some (unregistered) bugs fixed.
Bug fixes.
Initial release.
Almost feature-complete (ready for 95% of users), but it could be still buggy (it’s beta!), and the code wasn’t optimized for size and speed. In all other ways it’s ready for wide testing.