firebird.driver.interfaces

This module contains interface wrappers for Firebird new API.

Classes

iVersionedMeta

class firebird.driver.interfaces.iVersionedMeta

Bases: type

Metaclass for iVersioned interfaces.

This metaclass uses MRO to instantiate wrapper interface with version that matches version of wrapped interface.

Firebird API Interface wrappers

iVersioned

class firebird.driver.interfaces.iVersioned(intf)

Bases: object

IVersioned interface wrapper

VERSION = 1
property status

iStatus for interface

Return type

iStatus

property version

Interface version

Return type

int

property vtable

Interface method table

iReferenceCounted

class firebird.driver.interfaces.iReferenceCounted(intf)

Bases: firebird.driver.interfaces.iVersioned

IReferenceCounted interface wrapper

add_ref()

Increase the reference by one

Return type

None

release()

Decrease the reference by one

Return type

int

VERSION = 2

iDisposable

class firebird.driver.interfaces.iDisposable(intf)

Bases: firebird.driver.interfaces.iVersioned

IDisposable interface wrapper

dispose()

Dispose the interfaced object

Return type

None

VERSION = 2

iStatus

class firebird.driver.interfaces.iStatus(intf)

Bases: firebird.driver.interfaces.iDisposable

Class that wraps IStatus interface for use from Python

clone()

Create clone of current interface

Return type

iStatus

get_errors()

Returns errors vector

Return type

LP_c_long_Array_20

get_state()

Returns state flags, may be OR-ed.

Return type

StateFlag

get_warning()

Returns warnings vector

Return type

LP_c_long_Array_20

init()

Cleanup interface, set it to initial state

Return type

None

set_errors(value)

Set contents of errors vector, length is defined by value context

Return type

None

set_errors2(length, value)

Set contents of errors vector with length explicitly specified in a call

Return type

None

set_warning2(length, value)

Set contents of warnings vector with length explicitly specified in a call

Return type

None

set_warnings(value)

Set contents of warnings vector, length is defined by value context

Return type

None

VERSION = 3

iPluginBase

class firebird.driver.interfaces.iPluginBase(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

IPluginBase interface wrapper

get_owner()

Returns owner

Return type

iReferenceCounted

set_owner(r)

Set the owner

Return type

None

VERSION = 3

iConfigEntry

class firebird.driver.interfaces.iConfigEntry(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IConfigEntry interface for use from Python

get_bool_value()

Returns value as boolean

Return type

bool

get_int_value()

Returns value as integer

Return type

int

get_name()

Returns key name

Return type

str

get_sub_config(status)

Treats sub-entries as separate configuration file and returns IConfig interface for it

Return type

iConfig

get_value()

Returnd value string value

Return type

str

VERSION = 3

iConfig

class firebird.driver.interfaces.iConfig(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IConfig interface for use from Python

find(name)

Find entry by name

Return type

iConfigEntry

find_pos(name, pos)

Find entry by name and position. If configuration file contains lines:

Db=DBA
Db=DBB
Db=DBC

call to find_pos(status, “Db”, 2) will return entry with value DBB.

Return type

iConfigEntry

find_value(name, value)

Find entry by name and value

Return type

iConfigEntry

VERSION = 3

iFirebirdConf_v3

class firebird.driver.interfaces.iFirebirdConf_v3(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IFirebirdConf v3 interface for use from Python

as_boolean(key)

Returns boolean value of conf. parameter

Return type

bool

as_integer(key)

Returns integer value of conf. parameter

Return type

int

as_string(key)

Returns string value of conf. parameter

Return type

str

get_key(name)

Returns key for configuration parameter.

Note

If parameter with given name does not exists, returns 0xffffffff.

Return type

int

VERSION = 3

iFirebirdConf

class firebird.driver.interfaces.iFirebirdConf(intf)

Bases: firebird.driver.interfaces.iFirebirdConf_v3

Class that wraps IFirebirdConf v4 interface for use from Python

get_version()

Returns configuration version

Return type

int

VERSION = 4

iPluginManager

class firebird.driver.interfaces.iPluginManager(intf)

Bases: firebird.driver.interfaces.iVersioned

IPluginManager interface wrapper. This is only STUB.

VERSION = 2

iConfigManager_v2

class firebird.driver.interfaces.iConfigManager_v2(intf)

Bases: firebird.driver.interfaces.iVersioned

Class that wraps IConfigManager v2 interface for use from Python

get_database_conf(database)

Returns interface to access db-specific configuration. Takes into an account firebird.conf and appropriate part of databases.conf.

Return type

iFirebirdConf

get_directory(dirspec)

Returns location of appropriate directory in current firebird instance

Return type

str

get_firebird_conf()

Returns interface to access default configuration values (from firebird.conf)

Return type

iFirebirdConf

get_install_directory()

Returns directory where firebird is installed

Return type

str

get_plugin_config(plugin)

Returns interface to access named plugin configuration

Return type

iConfig

get_root_directory()

Returns root directory of current instance, in single-instance case usually matches install directory

Return type

str

VERSION = 2

iConfigManager

class firebird.driver.interfaces.iConfigManager(intf)

Bases: firebird.driver.interfaces.iConfigManager_v2

Class that wraps IConfigManager v3 interface for use from Python

get_default_security_db()

Returns default security database.

Return type

str

VERSION = 3

iBlob

class firebird.driver.interfaces.iBlob(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IBlob interface for use from Python

cancel()

Replaces isc_cancel_blob(). On success releases interface.

Return type

None

close()

Replaces isc_close_blob(). On success releases interface.

Return type

None

get_info(items, buffer)

Replaces isc_blob_info()

Return type

None

get_info2(code)

Returns information about BLOB

Return type

Any

get_segment(size, buffer, bytes_read)

Replaces isc_get_segment(). Unlike it never returns isc_segstr_eof and isc_segment errors (that are actually not errors), instead returns completion codes IStatus::RESULT_NO_DATA and IStatus::RESULT_SEGMENT, normal return is IStatus::RESULT_OK.

Return type

StateResult

put_segment(length, buffer)

Replaces isc_put_segment()

Return type

None

seek(mode, offset)

Replaces isc_seek_blob()

Return type

int

VERSION = 3

iTransaction

class firebird.driver.interfaces.iTransaction(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps ITransaction interface for use from Python

commit()

Replaces isc_commit_transaction()

Return type

None

commit_retaining()

Replaces isc_commit_retaining()

Return type

None

disconnect()

Replaces fb_disconnect_transaction()

Return type

None

enter_dtc()

This method is used to support distributed transactions coordinator

Return type

iTransaction

get_info(items, buffer)

Replaces isc_transaction_info()

Return type

None

join(transaction)

Joins current transaction and passed as parameter transaction into single distributed transaction (using Dtc). On success both current transaction and passed as parameter transaction are released and should not be used any more.

Return type

iTransaction

prepare(message=None)

Replaces isc_prepare_transaction2()

Return type

None

rollback()

Replaces isc_rollback_transaction()

Return type

None

rollback_retaining()

Replaces isc_rollback_retaining()

Return type

None

validate(attachment)

This method is used to support distributed transactions coordinator

Return type

iTransaction

VERSION = 3

iMessageMetadata_v3

class firebird.driver.interfaces.iMessageMetadata_v3(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IMessageMetadata v3 interface for use from Python

get_alias(index)

Returns field alias

Return type

str

get_builder()

Returns MetadataBuilder interface initialized with this message metadata

Return type

iMetadataBuilder

get_charset(index)

Returns character set for character field and text blob

Return type

int

get_count()

Returns number of fields/parameters in a message. In all calls, containing index parameter, it’s value should be: 0 <= index < getCount().

Return type

int

get_field(index)

Returns field name

Return type

str

get_length(index)

Returns maximum field length

Return type

int

get_message_length()

Returns length of message buffer (use it to allocate memory for the buffer)

Return type

int

get_null_offset(index)

Returns offset of null indicator for a field in message buffer

Return type

int

get_offset(index)

Returns offset of field data in message buffer (use it to access data in message buffer)

Return type

int

get_owner(index)

Returns relation’s owner name

Return type

str

get_relation(index)

Returns relation name (from which given field is selected)

Return type

str

get_scale(index)

Returns scale factor for numeric field

Return type

int

get_subtype(index)

Returns blob field subtype (0 – binary, 1 – text, etc.)

Return type

int

get_type(index)

Returns field SQL type

Return type

SQLDataType

is_nullable(index)

Returns True if field is nullable

Return type

bool

VERSION = 3

iMessageMetadata

class firebird.driver.interfaces.iMessageMetadata(intf)

Bases: firebird.driver.interfaces.iMessageMetadata_v3

Class that wraps IMessageMetadata v4 interface for use from Python

get_aligned_length()

TODO

Return type

int

get_alignment()

TODO

Return type

int

VERSION = 4

iMetadataBuilder_v3

class firebird.driver.interfaces.iMetadataBuilder_v3(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IMetadataBuilder v3 interface for use from Python

add_field()

Add field

Return type

int

get_metadata()

Returns MessageMetadata interface built by this builder

Return type

iMessageMetadata

move_name_to_index(name, index)

Reorganize fields in a message – move field “name” to given position

Return type

None

remove(index)

Remove field

Return type

None

set_charset(index, charset)

Set character set for character field and text blob

Return type

None

set_length(index, length)

Set maximum length of character field

Return type

None

set_scale(index, scale)

Set scale factor for numeric field

Return type

None

set_subtype(index, subtype)

Set blob field subtype

Return type

None

set_type(index, field_type)

Set SQL type of a field

Return type

None

truncate(count)

Truncate message to contain not more than count fields

Return type

None

VERSION = 3

iMetadataBuilder

class firebird.driver.interfaces.iMetadataBuilder(intf)

Bases: firebird.driver.interfaces.iMetadataBuilder_v3

Class that wraps IMetadataBuilder v4 interface for use from Python

set_alias(index, alias)

Set the alias

Return type

None

set_field(index, field)

Set field name

Return type

None

set_owner(index, owner)

Set owner name

Return type

None

set_relation(index, relation)

Set relation name

Return type

None

VERSION = 4

iResultSet

class firebird.driver.interfaces.iResultSet(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IResultSet interface for use from Python

close()

Close result set, releases interface on success

Return type

None

fetch_absolute(position, message)

Fetch record by it’s absolute position in result set

Return type

StateResult

fetch_first(message)

Fetch first record

Return type

StateResult

fetch_last(message)

Fetch last record

Return type

StateResult

fetch_next(message)

Fetch next record, replaces isc_dsql_fetch(). This method (and other fetch methods) returns completion code Status::RESULT_NO_DATA when EOF is reached, Status::RESULT_OK on success.

Return type

StateResult

fetch_prior(message)

Fetch previous record

Return type

StateResult

fetch_relative(offset, message)

Fetch record by position relative to current

Return type

StateResult

get_metadata()

Get metadata for messages in result set, specially useful when result set is opened by IAttachment::openCursor() call with NULL output metadata format parameter (this is the only way to obtain message format in this case)

Return type

iMessageMetadata

is_bof()

Check for BOF

Return type

bool

is_eof()

Check for EOF

Return type

bool

set_delayed_output_format(fmt)

Information not available

Return type

None

VERSION = 3

iStatement_v3

class firebird.driver.interfaces.iStatement_v3(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IStatement v3 interface for use from Python

execute(transaction, in_meta, in_buffer, out_meta, out_buffer)

Executes any SQL statement except returning multiple rows of data. Partial analogue of isc_dsql_execute2() - in and out XSLQDAs replaced with input and output messages with appropriate buffers.

Return type

None

free()

Free statement, releases interface on success

Return type

None

get_affected_records()

Returns number of records affected by statement

Return type

int

get_flags()

Returns flags describing how this statement should be executed, simplified replacement of getType() method

Return type

StatementFlag

get_info(items, buffer)

Replaces isc_dsql_sql_info()

Return type

None

get_input_metadata()

Returns parameters metadata

Return type

iMessageMetadata

get_output_metadata()

Returns output values metadata

Return type

iMessageMetadata

get_plan(detailed)

Returns statement execution plan

Return type

str

get_type()

Statement type, currently can be found only in firebird sources in dsql/dsql.h

Return type

StatementType

open_cursor(transaction, in_meta, in_buffer, out_meta, flags)

Executes SQL statement potentially returning multiple rows of data. Returns ResultSet interface which should be used to fetch that data. Format of output data is defined by outMetadata parameter, leaving it NULL default format may be used. Parameter flags is needed to open bidirectional cursor setting it’s value to IStatement::CURSOR_TYPE_SCROLLABLE.

Return type

iResultSet

set_cursor_name(name)

Replaces isc_dsql_set_cursor_name()

Return type

None

VERSION = 3

iStatement

class firebird.driver.interfaces.iStatement(intf)

Bases: firebird.driver.interfaces.iStatement_v3

Class that wraps IStatement v4 interface for use from Python

create_batch(in_meta, params)

Create new batch

Return type

iBatch

get_timeout()

Return statement timeout

Return type

int

set_timeout(timeout)

Set the statement timeout

Return type

None

VERSION = 4

iBatch

class firebird.driver.interfaces.iBatch(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IBatch interface for use from Python

add(count, in_buffer)

TODO

Return type

None

add_blob(length, in_buffer, id_, params)

TODO

Return type

None

add_blob_stream(length, in_buffer)

TODO

Return type

None

append_blob_data(length, in_buffer)

TODO

Return type

None

cancel()

TODO

Return type

None

execute(transaction)

TODO

Return type

iBatchCompletionState

get_blob_alignment()

TODO

Return type

int

get_metadata()

TODO

Return type

iMessageMetadata

register_blob(existing, id_)

TODO

set_default_bpb(bpb)

TODO

Return type

None

VERSION = 3

iBatchCompletionState

class firebird.driver.interfaces.iBatchCompletionState(intf)

Bases: firebird.driver.interfaces.iDisposable

Class that wraps IBatchCompletionState interface for use from Python

find_error(pos)

TODO

Return type

int

get_size()

TODO

Return type

int

get_state(pos)

TODO

Return type

int

get_status(result, pos)

TODO

Return type

None

VERSION = 3

iRequest

class firebird.driver.interfaces.iRequest(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IRequest interface for use from Python

free()

Information not available

Return type

None

get_info(level, items, buffer)

Information not available

Return type

None

receive(level, msg_type, message)

Information not available

Return type

None

send(level, msg_type, message)

Information not available

Return type

None

start(transaction, level)

Information not available

Return type

None

start_and_send(transaction, level, msg_type, message)

Information not available

Return type

None

unwind(level)

Information not available

Return type

None

VERSION = 3

iEvents

class firebird.driver.interfaces.iEvents(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IEvents interface for use from Python

cancel()

Cancels events monitoring started by IAttachment::queEvents()

Return type

None

VERSION = 3

iAttachment_v3

class firebird.driver.interfaces.iAttachment_v3(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IAttachment v3 interface for use from Python

cancel_operation(option)

Replaces fb_cancel_operation()

Return type

None

compile_request(blr)

Support of ISC API

Return type

iRequest

create_blob(transaction, id_, bpb=None)

Creates new blob, stores it’s identifier in id, replaces isc_create_blob2()

Return type

iBlob

detach()

Replaces isc_detach_database(). On success releases interface.

Return type

None

drop_database()

Replaces isc_drop_database(). On success releases interface.

Return type

None

execute(transaction, stmt, dialect, in_metadata=None, in_buffer=None, out_metadata=None, out_buffer=None)

Executes any SQL statement except returning multiple rows of data. Partial analogue of isc_dsql_execute2() - in and out XSLQDAs replaced with input and output messages with appropriate buffers.

Return type

None

execute_dyn(transaction, dyn)

Support of ISC API

Return type

None

get_info(items, buffer)

Replaces isc_database_info()

Return type

None

get_slice(transaction, id_, sdl, param, slice_)

Support of ISC API

Return type

int

open_blob(transaction, id_, bpb=None)

Opens existing blob, replaces isc_open_blob2()

Return type

iBlob

open_cursor(transaction, stmt, dialect, in_metadata, in_buffer, out_metadata, cursor_name, cursor_flags)

Executes SQL statement potentially returning multiple rows of data. Returns iResultSet interface which should be used to fetch that data. Format of output data is defined by out_metadata parameter, leaving it NULL default format may be used. Parameter cursor_name specifies name of opened cursor (analogue of isc_dsql_set_cursor_name()). Parameter cursor_flags is needed to open bidirectional cursor setting it’s value to Istatement::CURSOR_TYPE_SCROLLABLE.

Return type

iResultSet

ping()

Checks connection status. If test fails the only operation possible with attachment is to close it.

Return type

None

prepare(transaction, stmt, dialect, flags=<PreparePrefetchFlag.METADATA: 71>)

Replaces isc_dsql_prepare(). Additional parameter flags makes it possible to control what information will be preloaded from engine at once (i.e. in single network packet for remote operation).

Return type

iStatement

put_slice(transaction, id_, sdl, param, slice_)

Support of ISC API

Return type

None

que_events(callback, events)

Replaces isc_que_events() call. Instead callback function with void* parameter callback interface is used.

Return type

iEvents

reconnect_transaction(id_)

Makes it possible to connect to a transaction in limbo. Id parameter contains transaction number in network format of given length.

Return type

iTransaction

start_transaction(tpb)

Partially replaces isc_start_multiple(), to start >1 transaction distributed transactions coordinator should be used, also possible to join 2 transactions into single distributed transaction

Return type

iTransaction

transact_request(transaction, blr, in_msg, out_msg)

Support of ISC API

Return type

None

VERSION = 3

iAttachment

class firebird.driver.interfaces.iAttachment(intf)

Bases: firebird.driver.interfaces.iAttachment_v3

Class that wraps IAttachment v4 interface for use from Python

create_batch(transaction, stmt, dialect, in_metadata, params)

TODO

Return type

iBatch

get_idle_timeout()

TODO

Return type

int

get_statement_timeout()

TODO

Return type

int

set_idle_timeout(timeout)

TODO

Return type

None

set_statement_timeout(timeout)

TODO

Return type

None

VERSION = 4

iService

class firebird.driver.interfaces.iService(intf)

Bases: firebird.driver.interfaces.iReferenceCounted

Class that wraps IService interface for use from Python

detach()

Close attachment to services manager, on success releases interface. Replaces isc_service_detach().

Return type

None

query(send, receive, buffer)

Send and request information to/from service, with different receive may be used for both running services and to obtain various server-wide information. Replaces isc_service_query().

Return type

None

start(spb)

Start utility in services manager. Replaces isc_service_start().

Return type

None

VERSION = 3

iProvider

class firebird.driver.interfaces.iProvider(intf)

Bases: firebird.driver.interfaces.iPluginBase

Class that wraps IProvider interface for use from Python

attach_database(filename, dpb=None, encoding='ascii')

Replaces isc_attach_database()

Return type

iAttachment

attach_service_manager(service, spb)

Replaces isc_service_attach()

Return type

iService

create_database(filename, dpb, encoding='ascii')

Replaces isc_create_database()

Return type

iAttachment

set_dbcrypt_callback(callback)

Sets database encryption callback interface that will be used for following database and service attachments

Return type

None

shutdown(timeout, reason)

Replaces fb_shutdown()

Return type

None

VERSION = 4

iDtcStart

class firebird.driver.interfaces.iDtcStart(intf)

Bases: firebird.driver.interfaces.iDisposable

Class that wraps IDtcStart interface for use from Python

add_attachment(attachment)

Adds attachment, transaction for it will be started with default TPB

Return type

None

add_with_tpb(attachment, tpb)

Adds attachment and TPB which will be used to start transaction for this attachment

Return type

None

start()

Start distributed transaction for accumulated attachments. On successful return DtcStart interface is disposed automatically.

Return type

iTransaction

VERSION = 3

iDtc

class firebird.driver.interfaces.iDtc(intf)

Bases: firebird.driver.interfaces.iVersioned

Class that wraps IDtc interface for use from Python

join(one, two)

Joins 2 independent transactions into distributed transaction. On success both transactions passed to join() are released and pointers to them should not be used any more.

Return type

iTransaction

start_builder()

Returns DtcStart interface

Return type

iDtcStart

VERSION = 2

iTimerControl

class firebird.driver.interfaces.iTimerControl(intf)

Bases: firebird.driver.interfaces.iVersioned

Class that wraps ITimerControl interface for use from Python

start(timer, microseconds)

Start ITimer to alarm after given delay (in microseconds, 10-6 seconds). Timer will be waked up only once after this call.

Return type

None

stop(timer)

Stop ITimer. It’s not an error to stop not started timer thus avoiding problems with races between stop() and timer alarm.

Return type

None

VERSION = 2

iXpbBuilder

class firebird.driver.interfaces.iXpbBuilder(intf)

Bases: firebird.driver.interfaces.iDisposable

Class that wraps IXpbBuilder interface for use from Python

clear()

Reset builder to empty state.

Return type

None

find_first(tag)

Finds first clumplet with given tag.

Return type

bool

find_next()

Finds next clumplet with given tag.

Return type

bool

get_bigint()

Returns value of current clumplet as 64-bit integer.

Return type

int

get_buffer()

Returns the parameters block.

Return type

bytes

get_buffer_length()

Returns length of parameters block.

Return type

int

get_bytes()

Returns value of current clumplet as bytes.

Return type

bytes

get_int()

Returns value of current clumplet as integer.

Return type

int

get_length()

Returns length of current clumplet value.

Return type

int

get_string()

Returns value of current clumplet as string.

Return type

str

get_tag()

Returns tag for current clumplet.

Return type

int

insert_bigint(tag, value)

Inserts a clumplet with value representing integer in network format.

Return type

None

insert_bytes(tag, value)

Inserts a clumplet with value containing passed bytes.

Return type

None

insert_int(tag, value)

Inserts a clumplet with value representing integer in network format.

Return type

None

insert_string(tag, value, encoding='ascii')

Inserts a clumplet with value containing passed string.

Return type

None

insert_tag(tag)

Inserts a clumplet without a value.

Return type

None

is_eof()

Checks that there is no current clumplet.

Return type

bool

move_next()

Moves to next clumplet.

Return type

None

remove_current()

Removes current clumplet.

Return type

None

rewind()

Moves to first clumplet.

Return type

None

VERSION = 3

iUtil_v2

class firebird.driver.interfaces.iUtil_v2(intf)

Bases: firebird.driver.interfaces.iVersioned

Class that wraps IUtil v2 interface for use from Python

decode_date(date)

Replaces isc_decode_sql_date()

Return type

date

decode_time(atime)

Replaces isc_decode_sql_time()

Return type

time

dump_blob(blob_id, attachment, transaction, filename, is_text)

Save blob to file

Return type

None

encode_date(date)

Replaces isc_encode_sql_date()

Return type

c_int

encode_time(atime)

Replaces isc_encode_sql_time()

Return type

c_uint

execute_create_database(stmt, dialect)

Execute “CREATE DATABASE …” statement – ISC trick with NULL statement handle does not work with interfaces.

Return type

iAttachment

format_status(status)

Replaces fb_interpret(). Size of buffer, passed into this method, should not be less than 50 bytes.

Return type

str

get_client_version()

Returns integer, containing major version in byte 0 and minor version in byte 1

Return type

int

get_fb_version(attachment, callback)

Produce long and beautiful report about firebird version used. It may be seen in ISQL when invoked with -Z switch.

Return type

None

get_perf_counters(attachment, counters_set)

Get statistics for given attachment

Return type

int

get_xpb_builder(kind, buffer=None)

Returns XpbBuilder interface.

Return type

iXpbBuilder

load_blob(blob_id, attachment, transaction, filename, is_text)

Load blob from file

Return type

None

set_offsets(metadata, callback)

Sets valid offsets in MessageMetadata. Performs calls to callback in OffsetsCallback for each field/parameter.

Return type

int

VERSION = 2

iUtil

class firebird.driver.interfaces.iUtil(intf)

Bases: firebird.driver.interfaces.iUtil_v2

Class that wraps IUtil v4 interface for use from Python

decode_time_tz(timetz)

Decodes TIME WITH TIMEZONE from internal format to datetime.time with tzinfo.

Return type

time

decode_time_tz_ex(timetz, hours, minutes, seconds, fractions, zone_bufer)

TODO

decode_timestamp_tz(timestamptz)

Decodes TIMESTAMP WITH TIMEZONE from internal format to datetime.datetime with tzinfo.

Return type

datetime

decode_timestamp_tz_ex(timestamptz, year, month, day, hours, minutes, seconds, fractions, zone_bufer)

TODO

encode_time_tz(time)

Encodes datetime.time with tzinfo into internal format for TIME WITH TIMEZONE.

Return type

bytes

encode_timestamp_tz(timestamp)

Encodes datetime.datetime with tzinfo into internal format for TIMESTAMP WITH TIMEZONE.

Return type

bytes

get_decfloat16()

Returns iDecFloat16 interface.

Return type

iDecFloat16

get_decfloat34()

Returns iDecFloat34 interface.

Return type

iDecFloat34

get_int128()

Returns iInt128 interface.

Return type

iInt128

STR_SIZE = 200
VERSION = 4

iDecFloat16

class firebird.driver.interfaces.iDecFloat16(intf)

Bases: firebird.driver.interfaces.iVersioned

Class that wraps IDecFloat16 interface for use from Python

from_bcd(value, into=None)

Make decimal float value from BCD

Return type

c_ulong

from_str(value, into=None)

Make decimal float value from string

Return type

c_ulong

to_bcd(value)

Convert decimal float value to BCD

Return type

BCD

to_str(value)

Convert decimal float value to string

Return type

str

BCD_SIZE = 16
STR_SIZE = 24
VERSION = 2

iDecFloat34

class firebird.driver.interfaces.iDecFloat34(intf)

Bases: firebird.driver.interfaces.iVersioned

Class that wraps IDecFloat34 interface for use from Python

from_bcd(value, into=None)

Make decimal float value from BCD

Return type

c_ulong_Array_2

from_str(value, into=None)

Make decimal float value from string

Return type

c_ulong_Array_2

to_bcd(value)

Convert decimal float value to BCD

Return type

BCD

to_str(value)

Convert decimal float value to string

Return type

str

BCD_SIZE = 34
STR_SIZE = 43
VERSION = 2

iInt128

class firebird.driver.interfaces.iInt128(intf)

Bases: firebird.driver.interfaces.iVersioned

Class that wraps IInt128 interface for use from Python

from_str(value, scale, into=None)
Return type

c_ulong_Array_2

to_str(value, scale)
Return type

str

STR_SIZE = 46
VERSION = 2

iMaster

class firebird.driver.interfaces.iMaster(intf)

Bases: firebird.driver.interfaces.iVersioned

Class that wraps IMaster interface for use from Python

get_config_manager()

Get instance of iConfigManager interface.

Return type

iConfigManager

get_dispatcher()

Get instance of iProvider interface, implemented by yValve (main provider instance).

Return type

iProvider

get_dtc()

Get instance of iDtc interface.

Return type

iDtc

get_metadata_builder(fieldCount)

Get instance of iMetadataBuilder interface.

Return type

iMetadataBuilder

get_plugin_manager()

Get instance of iPluginManager interface.

Return type

iPluginManager

get_process_exiting()

Information not available

Return type

bool

get_status()

Get instance if iStatus interface.

Return type

iStatus

get_timer_control()

Get instance of iTimerControl interface.

Return type

iTimerControl

get_util_interface()

Get instance of iUtil interface.

Return type

iUtil

register_attachment(provider, attachment)

Information not available

Return type

iAttachment

register_transaction(attachment, transaction)

Information not available

Return type

iTransaction

server_mode(mode)

Information not available

Return type

int

VERSION = 2

Interface implementations

iVersionedImpl

class firebird.driver.interfaces.iVersionedImpl

Bases: object

Base class for objects that implement IVersioned interface

VERSION = 1
property vtable

iReferenceCountedImpl

class firebird.driver.interfaces.iReferenceCountedImpl

Bases: firebird.driver.interfaces.iVersionedImpl

IReferenceCounted interface wrapper

add_ref()

Increase the reference by one

Return type

None

release()

Decrease the reference by one

Return type

int

VERSION = 2

iDisposableImpl

class firebird.driver.interfaces.iDisposableImpl

Bases: firebird.driver.interfaces.iVersionedImpl

IDisposable interface wrapper

dispose()

Dispose the interfaced object

Return type

None

VERSION = 2

iVersionCallbackImpl

class firebird.driver.interfaces.iVersionCallbackImpl

Bases: firebird.driver.interfaces.iVersionedImpl

Class that wraps IVersionCallback interface for use from Python

callback(text)

Method called by engine

Return type

None

VERSION = 2

iCryptKeyCallbackImpl

class firebird.driver.interfaces.iCryptKeyCallbackImpl

Bases: firebird.driver.interfaces.iVersionedImpl

Class that wraps ICryptKeyCallback interface for use from Python

get_crypt_key(data, max_key_size)

Should return crypt key

Return type

bytes

VERSION = 2

iOffsetsCallbackImp

class firebird.driver.interfaces.iOffsetsCallbackImp

Bases: firebird.driver.interfaces.iVersionedImpl

Class that wraps IOffsetsCallback interface for use from Python

set_offset(index, offset, nullOffset)

Method called by engine

Return type

None

VERSION = 2

iEventCallbackImpl

class firebird.driver.interfaces.iEventCallbackImpl

Bases: firebird.driver.interfaces.iReferenceCountedImpl

IEventCallback interface wrapper

events_arrived(events)

Method called by engine

Return type

None

VERSION = 3

iTimerImpl

class firebird.driver.interfaces.iTimerImpl

Bases: firebird.driver.interfaces.iReferenceCountedImpl

Class that wraps ITimer interface for use from Python

handler()

Timer callback handler

Return type

None

VERSION = 3