FDB Reference¶
Main driver namespace¶
Constants¶
- __version__:
Current driver version, string.
PyDB API 2.0 globals¶
- apilevel:
String constant stating the supported DB API level (2.0).
- threadsafety:
Integer constant stating the level of thread safety the interface supports. Curretly 1 = Threads may share the module, but not connections.
- paramstyle:
String constant stating the type of parameter marker formatting expected by the interface. ‘qmark’ = Question mark style, e.g. ‘…WHERE name=?’
Constants for work with driver hooks¶
HOOK_API_LOADED
HOOK_DATABASE_ATTACHED
HOOK_DATABASE_ATTACH_REQUEST
HOOK_DATABASE_DETACH_REQUEST
HOOK_DATABASE_CLOSED
HOOK_SERVICE_ATTACHED
Helper constants for work with Cursor.description
content¶
DESCRIPTION_NAME
DESCRIPTION_TYPE_CODE
DESCRIPTION_DISPLAY_SIZE
DESCRIPTION_INTERNAL_SIZE
DESCRIPTION_PRECISION
DESCRIPTION_SCALE
DESCRIPTION_NULL_OK
Helper Transaction Parameter Block (TPB) constants¶
- ISOLATION_LEVEL_READ_COMMITED_LEGACY:
R/W WAIT READ COMMITTED NO RECORD VERSION transaction.
- ISOLATION_LEVEL_READ_COMMITED:
R/W WAIT READ COMMITTED RECORD VERSION transaction.
- ISOLATION_LEVEL_REPEATABLE_READ:
Same as ISOLATION_LEVEL_SNAPSHOT.
- ISOLATION_LEVEL_SNAPSHOT:
R/W WAIT SNAPSHOT transaction.
- ISOLATION_LEVEL_SERIALIZABLE:
R/W WAIT SERIALIZABLE transaction.
- ISOLATION_LEVEL_SNAPSHOT_TABLE_STABILITY:
Same as ISOLATION_LEVEL_SERIALIZABLE.
- ISOLATION_LEVEL_READ_COMMITED_RO:
R/O WAIT READ COMMITTED RECORD VERSION transaction.
- MAX_BLOB_SEGMENT_SIZE:
- charset_map:
Python dictionary that maps Firebird character set names (key) to Python character sets (value).
ODS version numbers introduced by Firebird engine version¶
ODS_FB_20
ODS_FB_21
ODS_FB_25
ODS_FB_30
Translation dictionaries¶
- IMPLEMENTATION_NAMES:
Dictionary to map Implementation codes to names
- PROVIDER_NAMES:
Dictionary to map provider codes to names
- DB_CLASS_NAMES:
Dictionary to map database class codes to names
Firebird API constants and globals¶
|
|
|
|
|
Exceptions¶
- exception fdb.Error¶
Bases:
Exception
Exception that is the base class of all other error exceptions. You can use this to catch all errors with one single ‘except’ statement. Warnings are not considered errors and thus should not use this class as base.
- exception fdb.InterfaceError¶
Bases:
Error
Exception raised for errors that are related to the database interface rather than the database itself.
- exception fdb.DatabaseError¶
Bases:
Error
Exception raised for errors that are related to the database.
- exception fdb.DataError¶
Bases:
DatabaseError
Exception raised for errors that are due to problems with the processed data like division by zero, numeric value out of range, etc.
- exception fdb.OperationalError¶
Bases:
DatabaseError
Exception raised for errors that are related to the database’s operation and not necessarily under the control of the programmer, e.g. an unexpected disconnect occurs, the data source name is not found, a transaction could not be processed, a memory allocation error occurred during processing, etc.
- exception fdb.IntegrityError¶
Bases:
DatabaseError
Exception raised when the relational integrity of the database is affected, e.g. a foreign key check fails.
- exception fdb.InternalError¶
Bases:
DatabaseError
Exception raised when the database encounters an internal error, e.g. the cursor is not valid anymore, the transaction is out of sync, etc.
- exception fdb.ProgrammingError¶
Bases:
DatabaseError
Exception raised for programming errors, e.g. table not found or already exists, syntax error in the SQL statement, wrong number of parameters specified, etc.
- exception fdb.NotSupportedError¶
Bases:
DatabaseError
Exception raised in case a method or database API was used which is not supported by the database
- exception fdb.TransactionConflict¶
Bases:
DatabaseError
- exception fdb.ParseError¶
Bases:
Exception
This is the exception inheritance layout:
StandardError
|__Warning
|__Error
|__InterfaceError
|__ParseError
|__DatabaseError
|__DataError
|__OperationalError
|__IntegrityError
|__InternalError
|__ProgrammingError
|__NotSupportedError
Functions¶
connect¶
- fdb.connect(dsn='', user=None, password=None, host=None, port=None, database=None, sql_dialect=3, role=None, charset=None, buffers=None, force_write=None, no_reserve=None, db_key_scope=None, isolation_level=b'\x03\t\x06\x0f\x11', connection_class=None, fb_library_name=None, no_gc=None, no_db_triggers=None, no_linger=None, utf8params=False)¶
Establish a connection to database.
- Keyword Arguments:
dsn – Connection string in format [host[/port]]:database
user (str) – User name. If not specified, fdb attempts to use ISC_USER envar.
password (str) – User password. If not specified, fdb attempts to use ISC_PASSWORD envar.
host (str) – Server host machine specification.
port (int) – Port used by Firebird server.
database (str) – Database specification (file spec. or alias)
sql_dialect (int) – SQL Dialect for connection (1, 2 or 3).
role (str) – User role.
charset (str) – Character set for connection.
buffers (int) – Page case size override for connection.
force_writes (int) – Forced writes override for connection.
no_reserve (int) – Page space reservation override for connection.
db_key_scope (int) – DBKEY scope override for connection.
isolation_level (int) – Default transaction isolation level for connection (not used) (0, 1, 2 or 3).
connection_class (subclass of
Connection
) – Custom connection classfb_library_name (str) – Full path to Firebird client library. See
load_api()
for details.no_gc (int) – No Garbage Collection flag.
no_db_triggers (int) – No database triggers flag (FB 2.1).
no_linger (int) – No linger flag (FB3).
utf8params (bool) – Notify server that database specification and other string parameters are in UTF-8.
- Returns:
attached database.
- Return type:
- Raises:
fdb.ProgrammingError – For bad parameter values.
fdb.DatabaseError – When connection cannot be established.
Important
You may specify the database using either dsn or database (with optional host), but not both.
Examples
con = fdb.connect(dsn='host:/path/database.fdb', user='sysdba', password='pass', charset='UTF8') con = fdb.connect(host='myhost', database='/path/database.fdb', user='sysdba', password='pass', charset='UTF8')
- Hooks:
Event HOOK_DATABASE_ATTACH_REQUEST: Executed after all parameters are preprocessed and before
Connection
is created. Hook must have signature: hook_func(dsn, dpb) where dpb isParameterBuffer
instance.Hook may return
Connection
(or subclass) instance or None. First instance returned by any hook will become the return value of this function and other hooks are not called.Event HOOK_DATABASE_ATTACHED: Executed before
Connection
(or subclass) instance is returned. Hook must have signature: hook_func(connection). Any value returned by hook is ignored.
create_database¶
- fdb.create_database(sql='', sql_dialect=3, dsn='', user=None, password=None, host=None, port=None, database=None, page_size=None, length=None, charset=None, files=None, connection_class=None, fb_library_name=None)¶
Creates a new database. Parameters could be specified either by supplied “CREATE DATABASE” statement, or set of database parameters.
- Keyword Arguments:
sql (str) – “CREATE DATABASE” statement.
sql_dialect (int) – SQL Dialect for newly created database (1 or 3).
dsn (str) – Connection string in format [host[/port]]:database
user (str) – User name. If not specified, fdb attempts to use ISC_USER envar.
password (str) – User password. If not specified, fdb attempts to use ISC_PASSWORD envar.
host (str) – Server host machine specification.
port (int) – Port used by Firebird server.
database (str) – Database specification (file spec. or alias)
page_size (int) – Database page size.
length (int) – Database size in pages.
charset (str) – Character set for connection.
files (str) – Specification of secondary database files.
connection_class (subclass of
Connection
) – Custom connection classfb_library_name (str) – Full path to Firebird client library. See
load_api()
for details.
- Returns:
the newly created database.
- Return type:
- Raises:
fdb.ProgrammingError – For bad parameter values.
fdb.DatabaseError – When database creation fails.
Example
con = fdb.create_database("create database '/temp/db.fdb' user 'sysdba' password 'pass'") con = fdb.create_database(dsn='/temp/db.fdb',user='sysdba',password='pass',page_size=8192)
- Hooks:
Event` HOOK_DATABASE_ATTACHED`: Executed before
Connection
(or subclass) instance is returned. Hook must have signature: hook_func(connection). Any value returned by hook is ignored.
load_api¶
- fdb.load_api(fb_library_name=None)¶
Initializes bindings to Firebird Client Library unless they are already initialized. Called automatically by
fdb.connect()
andfdb.create_database()
.- Parameters:
fb_library_name (str) – (optional) Path to Firebird Client Library.
specified (When it's not) –
library. (FDB does its best to locate appropriate client) –
- Returns:
fbclient_API
instance.
- Hooks:
Event HOOK_API_LOADED: Executed after api is initialized. Hook routine must have signature: hook_func(api). Any value returned by hook is ignored.
Classes¶
Connection¶
- class fdb.Connection(db_handle, dpb=None, sql_dialect=3, charset=None, isolation_level=b'\x03\t\x06\x0f\x11')¶
Represents a connection between the database client (the Python process) and the database server.
Important
DO NOT create instances of this class directly! Use only
connect()
orcreate_database()
to get Connection instances.- Parameters:
db_handle – Database handle provided by factory function.
- Keyword Arguments:
ConnectionWithSchema¶
- class fdb.ConnectionWithSchema(db_handle, dpb=None, sql_dialect=3, charset=None, isolation_level=b'\x03\t\x06\x0f\x11')¶
Connection
descendant that exposes all attributes of encapsulatedSchema
instance directly as connection attributes, exceptclose()
andbind()
, and those attributes that are already defined by Connection class.Note
Use connection_class parametr of
connect()
orcreate_database()
to create connections with direct schema interface.See also
fdb.schema.Schema
for list of methods that extend this class.- Parameters:
db_handle – Database handle provided by factory function.
- Keyword Arguments:
Cursor¶
- class fdb.Cursor(connection, transaction)¶
Represents a database cursor, which is used to execute SQL statement and manage the context of a fetch operation.
Important
DO NOT create instances of this class directly! Use only
Connection.cursor()
,Transaction.cursor()
andConnectionGroup.cursor()
to get Cursor instances that operate in desired context.Note
Cursor is actually a high-level wrapper around
PreparedStatement
instance(s) that handle the actual SQL statement execution and result management.Tip
Cursor supports the iterator protocol, yielding tuples of values like
fetchone()
.Important
The association between a Cursor and its
Transaction
andConnection
is set when the Cursor is created, and cannot be changed during the lifetime of that Cursor.- Parameters:
connection (
Connection
) – instance this cursor should be bound to.transaction (
Transaction
) – instance this cursor should be bound to.
Transaction¶
- class fdb.Transaction(connections, default_tpb=None, default_action='commit')¶
Represents a transaction context, which is used to execute SQL statement.
Important
DO NOT create instances of this class directly!
Connection
andConnectionGroup
manage Transaction internally, surfacing all important methods directly in their interfaces. If you want additional transactions independent fromConnection.main_transaction
, useConnection.trans()
method to obtain such Transaction instance.- Parameters:
connections (iterable) – Sequence of (up to 16)
Connection
instances.- Keyword Arguments:
default_tpb (
TPB
instance, iterable of isc_tpb_* constants or bytestring) – Transaction Parameter Block for this transaction. If None is specified, uses ISOLATION_LEVEL_READ_COMMITED.default_action (str) – Action taken when active transaction is ended automatically (during
close()
orbegin()
). Accepted values: ‘commit’ or ‘rollback’
- Raises:
fdb.ProgrammingError – When zero or more than 16 connections are given.
PreparedStatement¶
- class fdb.PreparedStatement(operation, cursor, internal=True)¶
Represents a prepared statement, an “inner” database cursor, which is used to manage the SQL statement execution and context of a fetch operation.
Important
DO NOT create instances of this class directly! Use only
Cursor.prep()
to get PreparedStatement instances.Note
PreparedStatements are bound to
Cursor
instance that created them, and using them with other Cursor would report an error.
ConnectionGroup¶
- class fdb.ConnectionGroup(connections=())¶
Manager for distributed transactions, i.e. transactions that span multiple databases.
Tip
ConnectionGroup supports in operator to check membership of connections.
- Parameters:
connections (iterable) – Sequence of
Connection
instances.
See also
See
add()
for list of exceptions the constructor may throw.
TransactionContext¶
- class fdb.TransactionContext(transaction)¶
Context Manager that manages transaction for object passed to constructor.
Performs rollback if exception is thrown inside code block, otherwise performs commit at the end of block.
Note
Transaction
acts as context manager and supports with statement directly.Examples
with TransactionContext(my_transaction): cursor.execute('insert into tableA (x,y) values (?,?)',(x,y)) cursor.execute('insert into tableB (x,y) values (?,?)',(x,y))
- Parameters:
transaction – Any object that supports begin(), commit() and rollback().
EventConduit¶
- class fdb.EventConduit(db_handle, event_names)¶
Represents a conduit through which database event notifications will flow into the Python program.
Important
DO NOT create instances of this class directly! Use only
Connection.event_conduit()
to get EventConduit instances.Notifications of any events are not accumulated until
begin()
method is called.From the moment the
begin()
method is called, notifications of any events that occur will accumulate asynchronously within the conduit’s internal queue until the conduit is closed either explicitly (via theclose()
method) or implicitly (via garbage collection).EventConduit implements context manager protocol to call method
begin()
andclose()
automatically.Example
with connection.event_conduit( ('event_a', 'event_b') ) as conduit: events = conduit.wait() process_events(events)
- Parameters:
db_handle – Database handle.
event_names (list) – List of strings that represent event names.
BlobReader¶
- class fdb.BlobReader(blobid, db_handle, tr_handle, is_text, charset)¶
BlobReader is a “file-like” class, so it acts much like a file instance opened in rb mode.
Important
DO NOT create instances of this class directly! BlobReader instances are returned automatically in place of output BLOB values when stream BLOB access is requested via
PreparedStatement.set_stream_blob()
.Tip
BlobReader supports iterator protocol, yielding lines like
readline()
.
TPB¶
- class fdb.TPB¶
Helper class for convenient and safe construction of custom Transaction Parameter Blocks.
TableReservation¶
- class fdb.TableReservation¶
A dictionary-like helper class that maps “TABLE_NAME”: (sharingMode, accessMode). It performs validation of values assigned to keys.
ParameterBuffer¶
- class fdb.ParameterBuffer(charset)¶
Helper class for construction of Database (and other) parameter buffers. Parameters are stored in insertion order.
Internally used classes exposed to driver users¶
_RowMapping¶
- class fdb.fbcore._RowMapping(description, row)¶
An internal dictionary-like class that wraps a row of results in order to map field name to field value.
Warning
We make ABSOLUTELY NO GUARANTEES about the return value of the fetch(one|many|all) methods except that it is a sequence indexed by field position, and no guarantees about the return value of the fetch(one|many|all)map methods except that it is a mapping of field name to field value.
Therefore, client programmers should NOT rely on the return value being an instance of a particular class or type.
EventBlock¶
- class fdb.fbcore.EventBlock(queue, db_handle, event_names)¶
Represents Firebird API structure for block of events.
TableAccessStats¶
- class fdb.fbcore._TableAccessStats(table_id)¶
An internal class that wraps results from
get_table_access_stats()
Services¶
Constants¶
shutdown_mode codes for Connection.shutdown()
and Connection.bring_online()
¶
SHUT_LEGACY
SHUT_NORMAL
SHUT_MULTI
SHUT_SINGLE
SHUT_FULL
shutdown_method codes for Connection.shutdown()
¶
SHUT_FORCE
SHUT_DENY_NEW_TRANSACTIONS
SHUT_DENY_NEW_ATTACHMENTS
mode codes for Connection.setWriteMode()
¶
WRITE_FORCED
WRITE_BUFFERED
mode codes for Connection.setAccessMode()
¶
ACCESS_READ_WRITE
ACCESS_READ_ONLY
Connection.get_server_capabilities()
return codes¶
CAPABILITY_MULTI_CLIENT
CAPABILITY_REMOTE_HOP
CAPABILITY_SERVER_CONFIG
CAPABILITY_QUOTED_FILENAME
CAPABILITY_NO_SERVER_SHUTDOWN
‘stats’ codes for Connection.backup()
/Connection.restore()
¶
STATS_TOTAL_TIME
STATS_TIME_DELTA
STATS_PAGE_READS
STATS_PAGE_WRITES
Functions¶
connect¶
- fdb.services.connect(host='service_mgr', user=None, password=None)¶
Establishes a connection to the Services Manager.
- Parameters:
Note
By definition, a Services Manager connection is bound to a particular host. Therefore, the database specified as a parameter to methods such as getStatistics MUST NOT include the host name of the database server.
- Hooks:
Event HOOK_SERVICE_ATTACHED: Executed before
Connection
instance is returned. Hook must have signature: hook_func(connection). Any value returned by hook is ignored.
Classes¶
Connection¶
- class fdb.services.Connection(host, user, password, charset=None)¶
Represents a sevice connection between the database client (the Python process) and the database server.
Important
DO NOT create instances of this class directly! Use only
connect()
to get Connection instances.Tip
Connection supports the iterator protocol, yielding lines of result like
readline()
.
User¶
- class fdb.services.User(name=None)¶
Database schema¶
Module globals¶
Firebird field type codes¶
|
|
|
|
|
|
Trigger masks¶
|
|
|
|
|
Trigger type codes¶
|
|
|
|
Collation parameters codes¶
COLLATION_PAD_SPACE
COLLATION_CASE_INSENSITIVE
COLLATION_ACCENT_INSENSITIVE
Index type names¶
INDEX_TYPE_ASCENDING
INDEX_TYPE_DESCENDING
Relation type codes¶
RELATION_TYPE_TABLE
RELATION_TYPE_VIEW
RELATION_TYPE_GTT
RELATION_TYPE_GTT_PRESERVE
RELATION_TYPE_GTT_DELETE
Procedure parameter type codes¶
PROCPAR_DATATYPE
PROCPAR_DOMAIN
PROCPAR_TYPE_OF_DOMAIN
PROCPAR_TYPE_OF_COLUMN
Section codes for Schema.get_metadata_ddl()
¶
|
|
|
|
Lists and disctionary maps¶
- COLUMN_TYPES:
Dictionary map from filed type codes to type names
- INTEGRAL_SUBTYPES:
List of integral type names, works as map
- INDEX_TYPES:
List of index types
- BLOB_SUBTYPES:
List of blob type names, works as map
- TRIGGER_PREFIX_TYPES:
List of trigger prefix type names, works as map
- TRIGGER_SUFFIX_TYPES:
List of trigger suffix type names, works as map
- TRIGGER_DB_TYPES:
List of db trigger type names, works as map
- TRIGGER_DDL_TYPES:
List of DLL trigger type names, works as map
- RESERVED:
List of reserved Firebird words
- NON_RESERVED:
List of non-reserved Firebird words
- SCRIPT_DEFAULT_ORDER:
List of default sections (in order) for
Schema.get_metadata_ddl()
Functions¶
get_grants¶
- fdb.schema.get_grants(privileges, grantors=None)¶
Get list of minimal set of SQL GRANT statamenets necessary to grant specified privileges.
- Parameters:
privileges (list) – List of
Privilege
instances.- Keyword Arguments:
grantors (list) – List of standard grantor names. Generates GRANTED BY clause for privileges granted by user that’s not in list.
iskeyword¶
- fdb.schema.iskeyword(ident)¶
Return True if ident is (any) Firebird keyword.
escape_single_quotes¶
- fdb.schema.escape_single_quotes(text)¶
Return text with any single quotes escaped (doubled).
Classes¶
Schema¶
BaseSchemaItem¶
Collation¶
- class fdb.schema.Collation(schema, attributes)¶
Bases:
BaseSchemaItem
Represents collation.
- Supported SQL actions:
User collation: create, drop, comment
System collation: comment
CharacterSet¶
- class fdb.schema.CharacterSet(schema, attributes)¶
Bases:
BaseSchemaItem
Represents character set.
- Supported SQL actions:
alter (collation=Collation instance or collation name), comment
DatabaseException¶
- class fdb.schema.DatabaseException(schema, attributes)¶
Bases:
BaseSchemaItem
Represents database exception.
- Supported SQL actions:
User exception: create, recreate, alter (message=string), create_or_alter, drop, comment
System exception: comment
Sequence¶
- class fdb.schema.Sequence(schema, attributes)¶
Bases:
BaseSchemaItem
Represents database generator/sequence.
- Supported SQL actions:
User sequence: create, alter (value=number), drop, comment
System sequence: comment
Index¶
- class fdb.schema.Index(schema, attributes)¶
Bases:
BaseSchemaItem
Represents database index.
- Supported SQL actions:
User index: create, activate, deactivate, recompute, drop, comment
System index: activate, recompute, comment
TableColumn¶
- class fdb.schema.TableColumn(schema, table, attributes)¶
Bases:
BaseSchemaItem
Represents table column.
- Supported SQL actions:
User column: drop, comment, alter (name=string, datatype=string_SQLTypeDef, position=number, expression=computed_by_expr, restart=None_or_init_value)
System column: comment
ViewColumn¶
- class fdb.schema.ViewColumn(schema, view, attributes)¶
Bases:
BaseSchemaItem
Represents view column.
- Supported SQL actions:
comment
Domain¶
- class fdb.schema.Domain(schema, attributes)¶
Bases:
BaseSchemaItem
Represents SQl Domain.
- Supported SQL actions:
User domain: create, drop, comment, alter (name=string, default=string_definition_or_None, check=string_definition_or_None, datatype=string_SQLTypeDef)
System domain: comment
Dependency¶
- class fdb.schema.Dependency(schema, attributes)¶
Bases:
BaseSchemaItem
Maps dependency between database objects.
- Supported SQL actions:
none
Constraint¶
- class fdb.schema.Constraint(schema, attributes)¶
Bases:
BaseSchemaItem
Represents table or column constraint.
- Supported SQL actions:
Constraint on user table except NOT NULL constraint: create, drop
Constraint on system table: none
Table¶
- class fdb.schema.Table(schema, attributes)¶
Bases:
BaseSchemaItem
Represents Table in database.
- Supported SQL actions:
- User table: create (no_pk=bool, no_unique=bool),
recreate (no_pk=bool, no_unique=bool), drop, comment
System table: comment
View¶
- class fdb.schema.View(schema, attributes)¶
Bases:
BaseSchemaItem
Represents database View.
- Supported SQL actions:
- User views: create, recreate, alter (columns=string_or_list, query=string,check=bool),
create_or_alter, drop, comment
System views: comment
Trigger¶
- class fdb.schema.Trigger(schema, attributes)¶
Bases:
BaseSchemaItem
Represents trigger.
- Supported SQL actions:
User trigger: create (inactive=bool), recreate, create_or_alter, drop, comment, alter (fire_on=string, active=bool,sequence=int, declare=string_or_list, code=string_or_list)
System trigger: comment
ProcedureParameter¶
- class fdb.schema.ProcedureParameter(schema, proc, attributes)¶
Bases:
BaseSchemaItem
Represents procedure parameter.
- Supported SQL actions:
comment
Procedure¶
- class fdb.schema.Procedure(schema, attributes)¶
Bases:
BaseSchemaItem
Represents stored procedure.
- Supported SQL actions:
User procedure: create (no_code=bool), recreate no_code=bool), create_or_alter (no_code=bool), drop, comment alter (input=string_or_list, output=string_or_list, declare=string_or_list, code=string_or_list)
System procedure: comment
Role¶
- class fdb.schema.Role(schema, attributes)¶
Bases:
BaseSchemaItem
Represents user role.
- Supported SQL actions:
User role: create, drop, comment
System role: comment
FunctionArgument¶
- class fdb.schema.FunctionArgument(schema, function, attributes)¶
Bases:
BaseSchemaItem
Represets UDF argument.
- Supported SQL actions:
none
Function¶
- class fdb.schema.Function(schema, attributes)¶
Bases:
BaseSchemaItem
Represents user defined function.
- Supported SQL actions:
External UDF: declare, drop, comment
PSQL UDF (FB 3, not declared in package): create (no_code=bool), recreate (no_code=bool), create_or_alter (no_code=bool), drop, alter (arguments=string_or_list, returns=string, declare=string_or_list, code=string_or_list)
System UDF: none
DatabaseFile¶
- class fdb.schema.DatabaseFile(schema, attributes)¶
Bases:
BaseSchemaItem
Represents database extension file.
- Supported SQL actions:
create
Shadow¶
- class fdb.schema.Shadow(schema, attributes)¶
Bases:
BaseSchemaItem
Represents database shadow.
- Supported SQL actions:
create, drop (preserve=bool)
Privilege¶
- class fdb.schema.Privilege(schema, attributes)¶
Bases:
BaseSchemaItem
Represents priviledge to database object.
- Supported SQL actions:
grant (grantors), revoke (grantors, grant_option)
Package¶
- class fdb.schema.Package(schema, attributes)¶
Bases:
BaseSchemaItem
Represents PSQL package.
- Supported SQL actions:
create (body=bool), recreate (body=bool), create_or_alter (body=bool), alter (header=string_or_list), drop (body=bool)
BackupHistory¶
- class fdb.schema.BackupHistory(schema, attributes)¶
Bases:
BaseSchemaItem
Represents entry of history for backups performed using the nBackup utility.
- Supported SQL actions:
None
Filter¶
- class fdb.schema.Filter(schema, attributes)¶
Bases:
BaseSchemaItem
Represents userdefined BLOB filter.
- Supported SQL actions:
BLOB filter: declare, drop, comment
System UDF: none
Monitoring information¶
Constants¶
Shutdown modes for DatabaseInfo.shutdown_mode
¶
SHUTDOWN_MODE_ONLINE
SHUTDOWN_MODE_MULTI
SHUTDOWN_MODE_SINGLE
SHUTDOWN_MODE_FULL
Backup states for DatabaseInfo.backup_state
¶
BACKUP_STATE_NORMAL
BACKUP_STATE_STALLED
BACKUP_STATE_MERGE
States for AttachmentInfo.state
, TransactionInfo.state
and StatementInfo.state
¶
STATE_IDLE
STATE_ACTIVE
Isolation modes for TransactionInfo.isolation_mode
¶
ISOLATION_CONSISTENCY
ISOLATION_CONCURRENCY
ISOLATION_READ_COMMITTED_RV
ISOLATION_READ_COMMITTED_NO_RV
Special timeout values for TransactionInfo.lock_timeout
¶
INFINITE_WAIT
NO_WAIT
Group codes for IOStatsInfo.group
¶
STAT_DATABASE
STAT_ATTACHMENT
STAT_TRANSACTION
STAT_STATEMENT
STAT_CALL
Security database¶
SEC_DEFAULT
SEC_SELF
SEC_OTHER
Classes¶
Monitor¶
- class fdb.monitor.Monitor¶
Class for access to Firebird monitoring tables.
BaseInfoItem¶
DatabaseInfo¶
- class fdb.monitor.DatabaseInfo(monitor, attributes)¶
Bases:
BaseInfoItem
Information about attached database.
AttachmentInfo¶
- class fdb.monitor.AttachmentInfo(monitor, attributes)¶
Bases:
BaseInfoItem
Information about attachment (connection) to database.
TransactionInfo¶
- class fdb.monitor.TransactionInfo(monitor, attributes)¶
Bases:
BaseInfoItem
Information about transaction.
StatementInfo¶
- class fdb.monitor.StatementInfo(monitor, attributes)¶
Bases:
BaseInfoItem
Information about executed SQL statement.
CallStackInfo¶
- class fdb.monitor.CallStackInfo(monitor, attributes)¶
Bases:
BaseInfoItem
Information about PSQL call (stack frame).
IOStatsInfo¶
- class fdb.monitor.IOStatsInfo(monitor, attributes)¶
Bases:
BaseInfoItem
Information about page and row level I/O operations, and about memory consumption.
TableStatsInfo¶
- class fdb.monitor.TableStatsInfo(monitor, attributes)¶
Bases:
BaseInfoItem
Information about row level I/O operations on single table.
ContextVariableInfo¶
- class fdb.monitor.ContextVariableInfo(monitor, attributes)¶
Bases:
BaseInfoItem
Information about context variable.
Firebird trace & audit¶
Constants¶
Trace event status codes¶
STATUS_OK
STATUS_FAILED
STATUS_UNAUTHORIZED
STATUS_UNKNOWN
Trace event codes¶
|
|
|
|
|
- EVENTS:
List of trace event names in order matching their numeric codes
Classes¶
Named tuples for information packages¶
- fdb.trace.AttachmentInfo(attachment_id, database, charset, protocol, address, user, role, remote_process, remote_pid)¶
- fdb.trace.TransactionInfo(attachment_id, transaction_id, options)¶
- fdb.trace.ServiceInfo(service_id, user, protocol, address, remote_process, remote_pid)¶
- fdb.trace.SQLInfo(sql_id, sql, plan)¶
- fdb.trace.ParamInfo(par_id, params)¶
- fdb.trace.AccessTuple(table, natural, index, update, insert, delete, backout, purge, expunge)¶
Named tuples for individual trace events¶
- fdb.trace.EventTraceInit(event_id, timestamp, session_name)¶
- fdb.trace.EventTraceSuspend(event_id, timestamp, session_name)¶
- fdb.trace.EventTraceFinish(event_id, timestamp, session_name)¶
- fdb.trace.EventCreate(event_id, timestamp, status, attachment_id, database, charset, protocol, address, user, role, remote_process, remote_pid)¶
- fdb.trace.EventDrop(event_id, timestamp, status, attachment_id, database, charset, protocol, address, user, role, remote_process, remote_pid)¶
- fdb.trace.EventAttach(event_id, timestamp, status, attachment_id, database, charset, protocol, address, user, role, remote_process, remote_pid)¶
- fdb.trace.EventDetach(event_id, timestamp, status, attachment_id, database, charset, protocol, address, user, role, remote_process, remote_pid)¶
- fdb.trace.EventTransactionStart(event_id, timestamp, status, attachment_id, transaction_id, options)¶
- fdb.trace.EventCommit(event_id, timestamp, status, attachment_id, transaction_id, options, run_time, reads, writes, fetches, marks)¶
- fdb.trace.EventRollback(event_id, timestamp, status, attachment_id, transaction_id, options, run_time, reads, writes, fetches, marks)¶
- fdb.trace.EventCommitRetaining(event_id, timestamp, status, attachment_id, transaction_id, options, run_time, reads, writes, fetches, marks)¶
- fdb.trace.EventRollbackRetaining(event_id, timestamp, status, attachment_id, transaction_id, options, run_time, reads, writes, fetches, marks)¶
- fdb.trace.EventPrepareStatement(event_id, timestamp, status, attachment_id, transaction_id, statement_id, sql_id, prepare_time)¶
- fdb.trace.EventStatementStart(event_id, timestamp, status, attachment_id, transaction_id, statement_id, sql_id, param_id)¶
- fdb.trace.EventStatementFinish(event_id, timestamp, status, attachment_id, transaction_id, statement_id, sql_id, param_id, records, run_time, reads, writes, fetches, marks, access)¶
- fdb.trace.EventFreeStatement(event_id, timestamp, attachment_id, transaction_id, statement_id, sql_id)¶
- fdb.trace.EventCloseCursor(event_id, timestamp, attachment_id, transaction_id, statement_id, sql_id)¶
- fdb.trace.EventTriggerStart(event_id, timestamp, status, attachment_id, transaction_id, trigger, table, event)¶
- fdb.trace.EventTriggerFinish(event_id, timestamp, status, attachment_id, transaction_id, trigger, table, event, run_time, reads, writes, fetches, marks, access)¶
- fdb.trace.EventProcedureStart(event_id, timestamp, status, attachment_id, transaction_id, procedure, param_id)¶
- fdb.trace.EventProcedureFinish(event_id, timestamp, status, attachment_id, transaction_id, procedure, param_id, run_time, reads, writes, fetches, marks, access)¶
- fdb.trace.EventServiceAttach(event_id, timestamp, status, service_id)¶
- fdb.trace.EventServiceDetach(event_id, timestamp, status, service_id)¶
- fdb.trace.EventServiceStart(event_id, timestamp, status, service_id, action, parameters)¶
- fdb.trace.EventServiceQuery(event_id, timestamp, status, service_id, action, parameters)¶
- fdb.trace.EventSetContext(event_id, timestamp, attachment_id, transaction_id, context, key, value)¶
- fdb.trace.EventError(event_id, timestamp, attachment_id, place, details)¶
- fdb.trace.EventServiceError(event_id, timestamp, service_id, place, details)¶
- fdb.trace.EventWarning(event_id, timestamp, attachment_id, place, details)¶
- fdb.trace.EventServiceWarning(event_id, timestamp, service_id, place, details)¶
- fdb.trace.EventSweepStart(event_id, timestamp, attachment_id, oit, oat, ost, next)¶
- fdb.trace.EventSweepProgress(event_id, timestamp, attachment_id, run_time, reads, writes, fetches, marks, access)¶
- fdb.trace.EventSweepFinish(event_id, timestamp, attachment_id, oit, oat, ost, next, run_time, reads, writes, fetches, marks)¶
- fdb.trace.EventSweepFailed(event_id, timestamp, attachment_id)¶
- fdb.trace.EventBLRCompile(event_id, timestamp, status, attachment_id, statement_id, content, prepare_time)¶
- fdb.trace.EventBLRExecute(event_id, timestamp, status, attachment_id, transaction_id, statement_id, content, run_time, reads, writes, fetches, marks, access)¶
- fdb.trace.EventDYNExecute(event_id, timestamp, status, attachment_id, transaction_id, content, run_time)¶
- fdb.trace.EventUnknown(event_id, timestamp, data)¶
TraceParser¶
GSTAT protocols¶
Module globals¶
GSTAT version¶
GSTAT_25
GSTAT_30
Database attribute codes¶
ATTR_FORCE_WRITE
ATTR_NO_RESERVE
ATTR_NO_SHARED_CACHE
ATTR_ACTIVE_SHADOW
ATTR_SHUTDOWN_MULTI
ATTR_SHUTDOWN_SINGLE
ATTR_SHUTDOWN_FULL
ATTR_READ_ONLY
ATTR_BACKUP_LOCK
ATTR_BACKUP_MERGE
ATTR_BACKUP_WRONG
Note
Also works as index to ATTRIBUTES.
- ATTRIBUTES:
List with database attribute names
Functions¶
empty_str¶
- fdb.gstat.empty_str(str_)¶
Return True if string is empty (whitespace don’t count) or None
parse¶
- fdb.gstat.parse(lines)¶
Parse output from Firebird gstat utility.
- Parameters:
lines (iterable) – Lines produced by Firebird gstat utility.
- Returns:
StatDatabase
instance with parsed results.- Raises:
fdb.ParseError – When any problem is found in input stream.
Classes¶
Named tuples¶
- fdb.gstat.FillDistribution(d20, d40, d50, d80, d100)¶
- fdb.gstat.Encryption(pages, encrypted, unencrypted)¶
StatDatabase¶
StatTable¶
StatTable3¶
StatIndex¶
StatIndex3¶
Firebird server log¶
Functions¶
parse¶
- fdb.log.parse(lines)¶
Parse Firebird server log and yield named tuples describing individual log entries/events.
- Parameters:
lines – Iterable of lines from Firebird server log.
- Raises:
fdb.ParseError – When any problem is found in input stream.
Classes¶
Named tuples¶
- fdb.log.LogEntry(source_id, timestamp, message)¶
Utilities¶
Functions¶
- fdb.utils.update_meta(self, other)¶
Helper function for
LateBindingProperty
class.
- fdb.utils.iter_class_properties(cls)¶
Iterator function.
- Parameters:
cls (class) – Class object.
- Yields:
name’, ‘property pairs for all properties in class.
- fdb.utils.iter_class_variables(cls)¶
Iterator function.
- Parameters:
cls (class) – Class object.
- Yields:
Names of all non-callable attributes in class.
- fdb.utils.embed_attributes(from_class, attr)¶
Class decorator that injects properties and attributes from another class instance embedded in class instances. Only attributes and properties that are not already defined in decorated class are injected.
- Parameters:
from_class (class) – Class that should extend decorated class.
attr (str) – Attribute name that holds instance of embedded class within decorated class instance.
Classes¶
LateBindingProperty¶
- class fdb.utils.LateBindingProperty(fget=None, fset=None, fdel=None, doc=None)¶
Bases:
property
Property class that binds to getter/setter/deleter methods when instance of class that define the property is created. This allows you to override these methods in descendant classes (if they are not private) without necessity to redeclare the property itself in descendant class.
Recipe from Tim Delaney, 2005/03/31 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/408713
Example
class C(object): def getx(self): print 'C.getx' return self._x def setx(self, x): print 'C.setx' self._x = x def delx(self): print 'C.delx' del self._x x = LateBindingProperty(getx, setx, delx) class D(C): def setx(self, x): print 'D.setx' super(D, self).setx(x) def delx(self): print 'D.delx' super(D, self).delx() c = C() c.x = 1 c.x c.x del c.x print d = D() d.x = 1 d.x d.x del d.x
- This has the advantages that:
You get back an actual property object (with attendant memory savings, performance increases, etc);
It’s the same syntax as using property(fget, fset, fdel, doc) except for the name;
It will fail earlier (when you define the class as opposed to when you use it).
It’s shorter ;)
If you inspect the property you will get back functions with the correct __name__, __doc__, etc.
Iterator¶
- class fdb.utils.Iterator(method, sentinel=None)¶
Generic iterator implementation.
- Parameters:
method (callable) – Callable without parameters that returns next item.
sentinel – Value that when returned by method indicates the end of sequence.
EmbeddedProperty¶
- class fdb.utils.EmbeddedProperty(obj, prop)¶
Bases:
property
Property class that forwards calls to getter/setter/deleter methods to respective property methods of another object. This class allows you to “inject” properties from embedded object into class definition of parent object.
- Parameters:
obj (string) – Attribute name with embedded object.
prop (property) – Property instance from embedded object.
EmbeddedAttribute¶
- class fdb.utils.EmbeddedAttribute(obj, attr)¶
Bases:
property
Property class that gets/sets attribute of another object. This class allows you to “inject” attributes from embedded object into class definition of parent object.
- Parameters:
obj (string) – Attribute name with embedded object.
attr (string) – Attribute name from embedded object.
ObjectList¶
- class fdb.utils.ObjectList(items=None, _cls=None, key_expr=None)¶
Bases:
list
List of objects with additional functionality.
New in version 2.0.
- Parameters:
items (iterable) – Sequence to initialize the collection.
_cls (class or list/tuple) – Only instances of these class(es) would be allowed in collection.
key_expr (str) – Key expression. Must contain item referrence as item, for example item.attribute_name.
- Raises:
ValueError – When initialization sequence contains invalid instance.
Visitable¶
- class fdb.utils.Visitable¶
Base class for Visitor Pattern support.
New in version 2.0.
Visitor¶
- class fdb.utils.Visitor¶
Base class for Visitor Pattern visitors.
New in version 2.0.
Descendants may implement methods to handle individual object types that follow naming pattern visit_<class_name>. Calls
default_action()
if appropriate special method is not defined.Important
This implementation uses Python Method Resolution Order (__mro__) to find special handling method, so special method for given class is used also for its decendants.
Example
class Node(object): pass class A(Node): pass class B(Node): pass class C(A,B): pass
- class MyVisitor(object):
- def default_action(self, obj):
print ‘default_action ‘+obj.__class__.__name__
- def visit_B(self, obj):
print ‘visit_B ‘+obj.__class__.__name__
a = A() b = B() c = C() visitor = MyVisitor() visitor.visit(a) visitor.visit(b) visitor.visit(c)
- Will create output:
default_action A visit_B B visit_B C
ctypes interface to Firebird client library¶
ctypes interface to fbclient.so/dll is defined in submodule fdb.ibase
and fdb.blr
.
The fdb.ibase
is the main module for Firebird API. The fdb.blr
module contains only constants related to Firebird’s low-level Binary Language Representation (BLR).
Constants¶
C integer limit constants¶
|
|
|
|
|
|
Type codes¶
|
|
|
|
|
|
Internal type codes (for example used by ARRAY descriptor)¶
|
|
|
|
|
|
Database parameter block stuff¶
|
|
|
|
|
Info structural codes¶
|
|
|
|
|
|
DB Info item codes¶
- isc_info_db_id:
[db_filename,site_name[,site_name…]]
- isc_info_reads:
number of page reads
- isc_info_writes:
number of page writes
- isc_info_fetches:
number of reads from the memory buffer cache
- isc_info_marks:
number of writes to the memory buffer cache
- isc_info_implementation:
(implementation code, implementation class)
- isc_info_isc_version:
interbase server version identification string
- isc_info_base_level:
capability version of the server
- isc_info_page_size:
database page size
- isc_info_num_buffers:
number of memory buffers currently allocated
- isc_info_limbo:
limbo transactions
- isc_info_current_memory:
amount of server memory (in bytes) currently in use
- isc_info_max_memory:
maximum amount of memory (in bytes) used at one time since the first process attached to the database
- isc_info_allocation:
number of last database page allocated
- isc_info_attachment_id:
attachment id number
all *_count codes below return {[table_id]=operation_count,…}; table IDs are in the system table RDB$RELATIONS.
- isc_info_read_seq_count:
number of sequential table scans (row reads) done on each table since the database was last attached
- isc_info_read_idx_count:
number of reads done via an index since the database was last attached
- isc_info_insert_count:
number of inserts into the database since the database was last attached
- isc_info_update_count:
number of database updates since the database was last attached
- isc_info_delete_count:
number of database deletes since the database was last attached
- isc_info_backout_count:
number of removals of a version of a record
- isc_info_purge_count:
number of removals of old versions of fully mature records (records that are committed, so that older ancestor versions are no longer needed)
- isc_info_expunge_count:
number of removals of a record and all of its ancestors, for records whose deletions have been committed
- isc_info_sweep_interval:
number of transactions that are committed between sweeps to remove database record versions that are no longer needed
- isc_info_ods_version:
On-disk structure (ODS) minor major version number
- isc_info_ods_minor_version:
On-disk structure (ODS) minor version number
- isc_info_no_reserve:
20% page space reservation for holding backup versions of modified records: 0=yes, 1=no
- isc_info_forced_writes:
mode in which database writes are performed: 0=sync, 1=async
- isc_info_user_names:
array of names of all the users currently attached to the database
- isc_info_page_errors:
number of page level errors validate found
- isc_info_record_errors:
number of record level errors validate found
- isc_info_bpage_errors:
number of blob page errors validate found
- isc_info_dpage_errors:
number of data page errors validate found
- isc_info_ipage_errors:
number of index page errors validate found
- isc_info_ppage_errors:
number of pointer page errors validate found
- isc_info_tpage_errors:
number of transaction page errors validate found
- isc_info_set_page_buffers:
number of memory buffers that should be allocated
- isc_info_db_sql_dialect:
dialect of currently attached database
- isc_info_db_read_only:
whether the database is read-only (1) or not (0)
- isc_info_db_size_in_pages:
number of allocated pages
- frb_info_att_charset:
charset of current attachment
- isc_info_db_class:
server architecture
- isc_info_firebird_version:
firebird server version identification string
- isc_info_oldest_transaction:
ID of oldest transaction
- isc_info_oldest_active:
ID of oldest active transaction
- isc_info_oldest_snapshot:
ID of oldest snapshot transaction
- isc_info_next_transaction:
ID of next transaction
- isc_info_db_provider:
for firebird is ‘isc_info_db_code_firebird’
- isc_info_active_transactions:
array of active transaction IDs
- isc_info_active_tran_count:
number of active transactions
- isc_info_creation_date:
time_t struct representing database creation date & time
- isc_info_db_file_size:
added in FB 2.1, nbackup-related - size (in pages) of locked db
- fb_info_page_contents:
added in FB 2.5, get raw page contents; takes page_number as parameter;
- fb_info_implementation:
(cpu code, OS code, compiler code, flags, implementation class)
- fb_info_page_warns:
number of page level warnings validate found
- fb_info_record_warns:
number of record level warnings validate found
- fb_info_bpage_warns:
number of blob page level warnings validate found
- fb_info_dpage_warns:
number of data page level warnings validate found
- fb_info_ipage_warns:
number of index page level warnings validate found
- fb_info_ppage_warns:
number of pointer page level warnings validate found
- fb_info_tpage_warns:
number of trabsaction page level warnings validate found
- fb_info_pip_errors:
number of pip page level errors validate found
- fb_info_pip_warns:
number of pip page level warnings validate found
- isc_info_version:
= isc_info_isc_version
Blob information items¶
|
|
|
|
Transaction information items¶
|
|
|
|
isc_info_tra_isolation responses:
isc_info_tra_consistency
isc_info_tra_concurrency
isc_info_tra_read_committed
isc_info_tra_read_committed options:
isc_info_tra_no_rec_version
isc_info_tra_rec_version
isc_info_tra_access responses:
isc_info_tra_readonly
isc_info_tra_readwrite
SQL information items¶
|
|
|
|
SQL information return values¶
|
|
|
|
Transaction parameter block stuff¶
|
|
|
|
|
|
BLOB parameter buffer¶
|
|
|
|
|
|
Service parameter block stuff¶
|
|
|
|
|
|
Parameters for isc_action_{add|del|mod|disp)_user:
|
|
|
|
|
|
Parameters for isc_action_svc_backup:
|
|
|
|
Parameters for isc_action_svc_properties:
|
|
|
|
Parameters for isc_spb_prp_shutdown_mode and isc_spb_prp_online_mode:
|
|
|
|
Parameters for isc_spb_prp_reserve_space:
|
|
Parameters for isc_spb_prp_write_mode:
|
|
Parameters for isc_action_svc_validate:
|
|
|
|
|
Parameters for isc_spb_prp_access_mode:
|
|
|
|
|
Parameters for isc_action_svc_restore:
|
|
|
|
Parameters for isc_spb_res_access_mode:
|
|
Parameters for isc_info_svc_svr_db_info:
|
|
Parameters for isc_info_svc_db_stats:
|
|
|
|
Parameters for isc_action_svc_nbak:
|
|
|
|
Parameters for trace:
|
|
Service action items¶
|
|
|
|
|
Service information items¶
|
|
|
|
BLOB action codes¶
|
|
|
|
|
Implementation codes¶
|
|
|
|
Info DB provider codes¶
|
|
|
|
Info DB class codes¶
|
|
|
|
Request information items¶
|
|
|
|
Access path items¶
|
|
|
|
|
Record Source Block (RSB) types¶
|
|
|
|
|
RSB Bitmap expressions¶
|
|
|
|
Info request response codes¶
|
|
|
|
Blob Subtypes¶
|
|
|
|
|
|
Cancel types for fb_cancel_operation¶
|
|
|
|
Other constants¶
DSQL_close
DSQL_drop
DSQL_unprepare
SQLDA_version1
isc_info_req_select_count
isc_info_req_insert_count
isc_info_req_update_count
isc_info_req_delete_count
flags set in fb_info_crypt_state:
fb_info_crypt_encrypted
fb_info_crypt_process
- FB_API_VER:
(int) Firebird API version number
- MAX_BLOB_SEGMENT_SIZE:
(int) Max size for BLOB segment
Types¶
Basic types¶
- fdb.ibase.ISC_STATUS_PTR¶
alias of
LP_c_long
- fdb.ibase.ISC_STATUS_ARRAY¶
alias of
c_long_Array_20
- fdb.ibase.FB_SQLSTATE_STRING¶
alias of
c_char_Array_6
- class fdb.ibase.ISC_TIMESTAMP¶
- class fdb.ibase.GDS_QUAD_t¶
- fdb.ibase.GDS_QUAD¶
alias of
GDS_QUAD_t
- fdb.ibase.ISC_QUAD¶
alias of
GDS_QUAD_t
- class fdb.ibase.ISC_ARRAY_BOUND¶
- class fdb.ibase.ISC_ARRAY_DESC¶
- class fdb.ibase.ISC_BLOB_DESC¶
- class fdb.ibase.isc_blob_ctl¶
- class fdb.ibase.bstream¶
- fdb.ibase.FB_BLOB_STREAM¶
alias of
LP_bstream
- class fdb.ibase.paramdsc¶
- class fdb.ibase.paramvary¶
ISC_TEB¶
- class fdb.ibase.ISC_TEB¶
XSQLVAR¶
- class fdb.ibase.XSQLVAR¶
XSQLDA¶
- class fdb.ibase.XSQLDA¶
- fdb.ibase.XSQLDA_PTR¶
alias of
LP_XSQLDA
USER_SEC_DATA¶
- class fdb.ibase.USER_SEC_DATA¶
RESULT_VECTOR¶
- fdb.ibase.RESULT_VECTOR¶
alias of
c_uint_Array_15
Callbacks¶
- class fdb.ibase.FB_SHUTDOWN_CALLBACK¶
ctypes.CFUNCTYPE(UNCHECKED(c_int), c_int, c_int, POINTER(None))
- class fdb.ibase.ISC_CALLBACK¶
ctypes.CFUNCTYPE(None)
- class fdb.ibase.ISC_PRINT_CALLBACK¶
ctypes.CFUNCTYPE(None, c_void_p, c_short, STRING)
- class fdb.ibase.ISC_VERSION_CALLBACK¶
ctypes.CFUNCTYPE(None, c_void_p, STRING)
- class fdb.ibase.ISC_EVENT_CALLBACK¶
ctypes.CFUNCTYPE(None, POINTER(ISC_UCHAR), c_ushort, POINTER(ISC_UCHAR))
- class fdb.ibase.blobcallback¶
Other globals¶
- charset_map:
Dictionary that maps DB CHAR SET NAME to PYTHON CODEC NAME (CANONICAL)
- fdb.ibase.ISC_TRUE¶
- fdb.ibase.ISC_FALSE¶
Functions¶
Classes¶
fbclient_API¶
- class fdb.ibase.fbclient_API(fb_library_name=None)¶
Firebird Client API interface object. Loads Firebird Client Library and exposes API functions as member methods. Uses ctypes for bindings.
- isc_event_block(event_buffer, result_buffer, *args)¶
Injects variable number of parameters into C_isc_event_block call
- BLOB_close(POINTER(BSTREAM))¶
BLOB_close(POINTER(BSTREAM))
- BLOB_display(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)¶
BLOB_display(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)
- BLOB_dump(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)¶
BLOB_dump(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)
- BLOB_edit(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)¶
BLOB_edit(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)
- BLOB_get(POINTER(BSTREAM))¶
BLOB_get(POINTER(BSTREAM))
- BLOB_load(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)¶
BLOB_load(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)
- BLOB_open(isc_blob_handle, STRING, c_int)¶
BLOB_open(isc_blob_handle, STRING, c_int)
- BLOB_put(ISC_SCHAR, POINTER(BSTREAM))¶
BLOB_put(ISC_SCHAR, POINTER(BSTREAM))
- BLOB_text_dump(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)¶
BLOB_text_dump(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)
- BLOB_text_load(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)¶
BLOB_text_load(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)
- Bopen(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)¶
Bopen(POINTER(ISC_QUAD), isc_db_handle, isc_tr_handle, STRING)
- C_isc_event_block(ISC_LONG, POINTER(POINTER(ISC_UCHAR)), POINTER(POINTER(ISC_UCHAR)), ISC_USHORT)¶
C_isc_event_block(ISC_LONG, POINTER(POINTER(ISC_UCHAR)), POINTER(POINTER(ISC_UCHAR)), ISC_USHORT)
- client_library¶
Firebird client library (loaded by ctypes)
- client_library_name¶
Firebird client library name
- fb_interpret(STRING, c_uint, POINTER(POINTER(ISC_STATUS)))¶
fb_interpret(STRING, c_uint, POINTER(POINTER(ISC_STATUS)))
- fb_shutdown(c_int, c_uint, c_int)¶
fb_shutdown(c_int, c_uint, c_int)
- fb_shutdown_callback(POINTER(ISC_STATUS), FB_SHUTDOWN_CALLBACK, c_int, c_void_p)¶
fb_shutdown_callback(POINTER(ISC_STATUS), FB_SHUTDOWN_CALLBACK, c_int, c_void_p)
- isc_add_user(POINTER(ISC_STATUS), POINTER(USER_SEC_DATA))¶
isc_add_user(POINTER(ISC_STATUS), POINTER(USER_SEC_DATA))
- isc_array_gen_sdl(POINTER(ISC_STATUS), POINTER(ISC_ARRAY_DESC), POINTER(ISC_SHORT), POINTER(ISC_UCHAR), POINTER(ISC_SHORT))¶
isc_array_gen_sdl(POINTER(ISC_STATUS), POINTER(ISC_ARRAY_DESC), POINTER(ISC_SHORT), POINTER(ISC_UCHAR), POINTER(ISC_SHORT))
- isc_array_get_slice(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(ISC_QUAD), POINTER(ISC_ARRAY_DESC), c_void_p, POINTER(ISC_LONG))¶
isc_array_get_slice(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(ISC_QUAD), POINTER(ISC_ARRAY_DESC), c_void_p, POINTER(ISC_LONG))
- isc_array_lookup_bounds(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), STRING, STRING, POINTER(ISC_ARRAY_DESC))¶
isc_array_lookup_bounds(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), STRING, STRING, POINTER(ISC_ARRAY_DESC))
- isc_array_lookup_desc(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), STRING, STRING, POINTER(ISC_ARRAY_DESC))¶
isc_array_lookup_desc(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), STRING, STRING, POINTER(ISC_ARRAY_DESC))
- isc_array_put_slice(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(ISC_QUAD), POINTER(ISC_ARRAY_DESC), c_void_p, POINTER(ISC_LONG))¶
isc_array_put_slice(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(ISC_QUAD), POINTER(ISC_ARRAY_DESC), c_void_p, POINTER(ISC_LONG))
- isc_array_set_desc(POINTER(ISC_STATUS), STRING, STRING, POINTER(c_short), POINTER(c_short), POINTER(c_short), POINTER(ISC_ARRAY_DESC))¶
isc_array_set_desc(POINTER(ISC_STATUS), STRING, STRING, POINTER(c_short), POINTER(c_short), POINTER(c_short), POINTER(ISC_ARRAY_DESC))
- isc_attach_database(POINTER(ISC_STATUS), c_short, STRING, POINTER(isc_db_handle), c_short, STRING)¶
isc_attach_database(POINTER(ISC_STATUS), c_short, STRING, POINTER(isc_db_handle), c_short, STRING)
- isc_blob_default_desc(POINTER(ISC_BLOB_DESC), POINTER(ISC_UCHAR), POINTER(ISC_UCHAR))¶
isc_blob_default_desc(POINTER(ISC_BLOB_DESC), POINTER(ISC_UCHAR), POINTER(ISC_UCHAR))
- isc_blob_gen_bpb(POINTER(ISC_STATUS), POINTER(ISC_BLOB_DESC), POINTER(ISC_BLOB_DESC), c_ushort, POINTER(ISC_UCHAR), POINTER(c_ushort))¶
isc_blob_gen_bpb(POINTER(ISC_STATUS), POINTER(ISC_BLOB_DESC), POINTER(ISC_BLOB_DESC), c_ushort, POINTER(ISC_UCHAR), POINTER(c_ushort))
- isc_blob_info(POINTER(ISC_STATUS), POINTER(isc_blob_handle), c_short, STRING, c_short, POINTER(c_char))¶
isc_blob_info(POINTER(ISC_STATUS), POINTER(isc_blob_handle), c_short, STRING, c_short, POINTER(c_char))
- isc_blob_lookup_desc(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(ISC_UCHAR), POINTER(ISC_UCHAR), POINTER(ISC_BLOB_DESC), POINTER(ISC_UCHAR))¶
isc_blob_lookup_desc(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(ISC_UCHAR), POINTER(ISC_UCHAR), POINTER(ISC_BLOB_DESC), POINTER(ISC_UCHAR))
- isc_blob_set_desc(POINTER(ISC_STATUS), POINTER(ISC_UCHAR), POINTER(ISC_UCHAR), c_short, c_short, c_short, POINTER(ISC_BLOB_DESC))¶
isc_blob_set_desc(POINTER(ISC_STATUS), POINTER(ISC_UCHAR), POINTER(ISC_UCHAR), c_short, c_short, c_short, POINTER(ISC_BLOB_DESC))
- isc_cancel_blob(POINTER(ISC_STATUS), POINTER(isc_blob_handle))¶
isc_cancel_blob(POINTER(ISC_STATUS), POINTER(isc_blob_handle))
- isc_cancel_events(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(ISC_LONG))¶
isc_cancel_events(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(ISC_LONG))
- isc_close(POINTER(ISC_STATUS), STRING)¶
isc_close(POINTER(ISC_STATUS), STRING)
- isc_close_blob(POINTER(ISC_STATUS), POINTER(isc_blob_handle))¶
isc_close_blob(POINTER(ISC_STATUS), POINTER(isc_blob_handle))
- isc_commit_retaining(POINTER(ISC_STATUS), POINTER(isc_tr_handle))¶
isc_commit_retaining(POINTER(ISC_STATUS), POINTER(isc_tr_handle))
- isc_commit_transaction(POINTER(ISC_STATUS), POINTER(isc_tr_handle)¶
isc_commit_transaction(POINTER(ISC_STATUS), POINTER(isc_tr_handle)
- isc_compile_request(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_req_handle), c_short, STRING)¶
isc_compile_request(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_req_handle), c_short, STRING)
- isc_compile_request2(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_req_handle), c_short, STRING)¶
isc_compile_request2(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_req_handle), c_short, STRING)
- isc_create_blob(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(isc_blob_handle), POINTER(ISC_QUAD))¶
isc_create_blob(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(isc_blob_handle), POINTER(ISC_QUAD))
- isc_create_blob2(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(isc_blob_handle), POINTER(ISC_QUAD), c_short, STRING)¶
isc_create_blob2(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(isc_blob_handle), POINTER(ISC_QUAD), c_short, STRING)
- isc_create_database(POINTER(ISC_STATUS), c_short, STRING, POINTER(isc_db_handle), c_short, STRING, c_short)¶
isc_create_database(POINTER(ISC_STATUS), c_short, STRING, POINTER(isc_db_handle), c_short, STRING, c_short)
- isc_database_info(POINTER(ISC_STATUS), POINTER(isc_db_handle), c_short, STRING, c_short, STRING)¶
isc_database_info(POINTER(ISC_STATUS), POINTER(isc_db_handle), c_short, STRING, c_short, STRING)
- isc_ddl(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_short, STRING)¶
isc_ddl(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_short, STRING) This function always returns error since FB 3.0
- isc_declare(POINTER(ISC_STATUS), STRING, STRING)¶
isc_declare(POINTER(ISC_STATUS), STRING, STRING)
- isc_decode_date(POINTER(ISC_QUAD), c_void_p)¶
isc_decode_date(POINTER(ISC_QUAD), c_void_p)
- isc_decode_sql_date(POINTER(ISC_DATE), c_void_p)¶
isc_decode_sql_date(POINTER(ISC_DATE), c_void_p)
- isc_decode_sql_time(POINTER(ISC_TIME), c_void_p)¶
isc_decode_sql_time(POINTER(ISC_TIME), c_void_p)
- isc_decode_timestamp(POINTER(ISC_TIMESTAMP), c_void_p)¶
isc_decode_timestamp(POINTER(ISC_TIMESTAMP), c_void_p)
- isc_delete_user(POINTER(ISC_STATUS), POINTER(USER_SEC_DATA))¶
isc_delete_user(POINTER(ISC_STATUS), POINTER(USER_SEC_DATA))
- isc_describe(POINTER(ISC_STATUS), STRING, POINTER(XSQLDA))¶
isc_describe(POINTER(ISC_STATUS), STRING, POINTER(XSQLDA))
- isc_describe_bind(POINTER(ISC_STATUS), STRING, POINTER(XSQLDA))¶
isc_describe_bind(POINTER(ISC_STATUS), STRING, POINTER(XSQLDA))
- isc_detach_database(POINTER(ISC_STATUS), POINTER(isc_db_handle))¶
isc_detach_database(POINTER(ISC_STATUS), POINTER(isc_db_handle))
- isc_drop_database(POINTER(ISC_STATUS), POINTER(isc_db_handle))¶
isc_drop_database(POINTER(ISC_STATUS), POINTER(isc_db_handle))
- isc_dsql_alloc_statement2(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_stmt_handle))¶
isc_dsql_alloc_statement2(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_stmt_handle))
- isc_dsql_allocate_statement(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_stmt_handle)¶
isc_dsql_allocate_statement(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_stmt_handle)
- isc_dsql_describe(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA))¶
isc_dsql_describe(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA))
- isc_dsql_describe_bind(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA)¶
isc_dsql_describe_bind(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA)
- isc_dsql_exec_immed2(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, POINTER(XSQLDA), POINTER(XSQLDA))¶
isc_dsql_exec_immed2(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, POINTER(XSQLDA), POINTER(XSQLDA))
- isc_dsql_exec_immed3_m(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, c_ushort, STRING, c_ushort, c_ushort, STRING, c_ushort, STRING, c_ushort, c_ushort, STRING)¶
isc_dsql_exec_immed3_m(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, c_ushort, STRING, c_ushort, c_ushort, STRING, c_ushort, STRING, c_ushort, c_ushort, STRING)
- isc_dsql_execute(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA))¶
isc_dsql_execute(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA))
- isc_dsql_execute2(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA), POINTER(XSQLDA))¶
isc_dsql_execute2(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA), POINTER(XSQLDA))
- isc_dsql_execute2_m(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, c_ushort, STRING, c_ushort, STRING, c_ushort, c_ushort, STRING)¶
isc_dsql_execute2_m(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, c_ushort, STRING, c_ushort, STRING, c_ushort, c_ushort, STRING)
- isc_dsql_execute_immediate(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, POINTER(XSQLDA))¶
isc_dsql_execute_immediate(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, POINTER(XSQLDA))
- isc_dsql_execute_immediate_m(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, c_ushort, STRING, c_ushort, c_ushort, STRING)¶
isc_dsql_execute_immediate_m(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, c_ushort, STRING, c_ushort, c_ushort, STRING)
- isc_dsql_execute_m(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, c_ushort, STRING)¶
isc_dsql_execute_m(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, c_ushort, STRING)
- isc_dsql_fetch(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA))¶
isc_dsql_fetch(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA))
- isc_dsql_fetch_m(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, c_ushort, STRING)¶
isc_dsql_fetch_m(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, c_ushort, STRING)
- isc_dsql_finish(POINTER(isc_db_handle))¶
isc_dsql_finish(POINTER(isc_db_handle))
- isc_dsql_free_statement(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort)¶
isc_dsql_free_statement(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort)
- isc_dsql_insert(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA))¶
isc_dsql_insert(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, POINTER(XSQLDA))
- isc_dsql_insert_m(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, c_ushort, STRING)¶
isc_dsql_insert_m(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, c_ushort, STRING)
- isc_dsql_prepare(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, POINTER(XSQLDA)¶
isc_dsql_prepare(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, POINTER(XSQLDA)
- isc_dsql_prepare_m(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, c_ushort, STRING, c_ushort, STRING)¶
isc_dsql_prepare_m(POINTER(ISC_STATUS), POINTER(isc_tr_handle), POINTER(isc_stmt_handle), c_ushort, STRING, c_ushort, c_ushort, STRING, c_ushort, STRING)
- isc_dsql_release(POINTER(ISC_STATUS), STRING)¶
isc_dsql_release(POINTER(ISC_STATUS), STRING)
- isc_dsql_set_cursor_name(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), STRING, c_ushort)¶
isc_dsql_set_cursor_name(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), STRING, c_ushort)
- isc_dsql_sql_info(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_short, STRING, c_short, STRING)¶
isc_dsql_sql_info(POINTER(ISC_STATUS), POINTER(isc_stmt_handle), c_short, STRING, c_short, STRING)
- isc_embed_dsql_close(POINTER(ISC_STATUS), STRING)¶
isc_embed_dsql_close(POINTER(ISC_STATUS), STRING)
- isc_embed_dsql_declare(POINTER(ISC_STATUS), STRING, STRING)¶
isc_embed_dsql_declare(POINTER(ISC_STATUS), STRING, STRING)
- isc_embed_dsql_describe(POINTER(ISC_STATUS), STRING, c_ushort, POINTER(XSQLDA))¶
isc_embed_dsql_describe(POINTER(ISC_STATUS), STRING, c_ushort, POINTER(XSQLDA))
- isc_embed_dsql_describe_bind(POINTER(ISC_STATUS), STRING, c_ushort, POINTER(XSQLDA))¶
isc_embed_dsql_describe_bind(POINTER(ISC_STATUS), STRING, c_ushort, POINTER(XSQLDA))
- isc_embed_dsql_execute(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, c_ushort, POINTER(XSQLDA))¶
isc_embed_dsql_execute(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, c_ushort, POINTER(XSQLDA))
- isc_embed_dsql_execute2(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, c_ushort, POINTER(XSQLDA), POINTER(XSQLDA))¶
isc_embed_dsql_execute2(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, c_ushort, POINTER(XSQLDA), POINTER(XSQLDA))
- isc_embed_dsql_execute_immed(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, POINTER(XSQLDA))¶
isc_embed_dsql_execute_immed(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, POINTER(XSQLDA))
- isc_embed_dsql_fetch(POINTER(ISC_STATUS), STRING, c_ushort, POINTER(XSQLDA))¶
isc_embed_dsql_fetch(POINTER(ISC_STATUS), STRING, c_ushort, POINTER(XSQLDA))
- isc_embed_dsql_fetch_a(POINTER(ISC_STATUS), POINTER(c_int), STRING, ISC_USHORT, POINTER(XSQLDA))¶
isc_embed_dsql_fetch_a(POINTER(ISC_STATUS), POINTER(c_int), STRING, ISC_USHORT, POINTER(XSQLDA))
- isc_embed_dsql_insert(POINTER(ISC_STATUS), STRING, c_ushort, POINTER(XSQLDA))¶
isc_embed_dsql_insert(POINTER(ISC_STATUS), STRING, c_ushort, POINTER(XSQLDA))
- isc_embed_dsql_open(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, c_ushort, POINTER(XSQLDA))¶
isc_embed_dsql_open(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, c_ushort, POINTER(XSQLDA))
- isc_embed_dsql_open2(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, c_ushort, POINTER(XSQLDA), POINTER(XSQLDA))¶
isc_embed_dsql_open2(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, c_ushort, POINTER(XSQLDA), POINTER(XSQLDA))
- isc_embed_dsql_prepare(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), STRING, c_ushort, STRING, c_ushort, POINTER(XSQLDA))¶
isc_embed_dsql_prepare(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), STRING, c_ushort, STRING, c_ushort, POINTER(XSQLDA))
- isc_embed_dsql_release(POINTER(ISC_STATUS), STRING)¶
isc_embed_dsql_release(POINTER(ISC_STATUS), STRING)
- isc_encode_date(c_void_p, POINTER(ISC_QUAD))¶
isc_encode_date(c_void_p, POINTER(ISC_QUAD))
- isc_encode_sql_date(c_void_p, POINTER(ISC_DATE))¶
isc_encode_sql_date(c_void_p, POINTER(ISC_DATE))
- isc_encode_sql_time(c_void_p, POINTER(ISC_TIME))¶
isc_encode_sql_time(c_void_p, POINTER(ISC_TIME))
- isc_encode_timestamp(c_void_p, POINTER(ISC_TIMESTAMP))¶
isc_encode_timestamp(c_void_p, POINTER(ISC_TIMESTAMP))
- isc_event_counts(POINTER(RESULT_VECTOR), c_short, POINTER(ISC_UCHAR), POINTER(ISC_UCHAR))¶
isc_event_counts(POINTER(RESULT_VECTOR), c_short, POINTER(ISC_UCHAR), POINTER(ISC_UCHAR))
- isc_execute(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, POINTER(XSQLDA))¶
isc_execute(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, POINTER(XSQLDA))
- isc_execute_immediate(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(c_short), STRING)¶
isc_execute_immediate(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(c_short), STRING)
- isc_expand_dpb(POINTER(STRING), POINTER(c_short))¶
isc_expand_dpb(POINTER(STRING), POINTER(c_short))
- isc_fetch(POINTER(ISC_STATUS), STRING, POINTER(XSQLDA))¶
isc_fetch(POINTER(ISC_STATUS), STRING, POINTER(XSQLDA))
- isc_free¶
isc_free(STRING
- isc_ftof(STRING, c_ushort, STRING, c_ushort)¶
isc_ftof(STRING, c_ushort, STRING, c_ushort)
- isc_get_client_major_version¶
isc_get_client_major_version()
- isc_get_client_minor_version¶
isc_get_client_minor_version()
- isc_get_client_version(STRING)¶
isc_get_client_version(STRING)
- isc_get_segment(POINTER(ISC_STATUS), POINTER(isc_blob_handle), POINTER(c_ushort), c_ushort, c_void_p)¶
isc_get_segment(POINTER(ISC_STATUS), POINTER(isc_blob_handle), POINTER(c_ushort), c_ushort, c_void_p)
- isc_get_slice(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(ISC_QUAD), c_short, STRING, c_short, POINTER(ISC_LONG), ISC_LONG, c_void_p, POINTER(ISC_LONG))¶
isc_get_slice(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(ISC_QUAD), c_short, STRING, c_short, POINTER(ISC_LONG), ISC_LONG, c_void_p, POINTER(ISC_LONG))
- isc_interprete(STRING, POINTER(POINTER(ISC_STATUS)))¶
isc_interprete(STRING, POINTER(POINTER(ISC_STATUS)))
- isc_modify_dpb(POINTER(STRING), POINTER(c_short), c_ushort, STRING, c_short)¶
isc_modify_dpb(POINTER(STRING), POINTER(c_short), c_ushort, STRING, c_short)
- isc_modify_user(POINTER(ISC_STATUS), POINTER(USER_SEC_DATA))¶
isc_modify_user(POINTER(ISC_STATUS), POINTER(USER_SEC_DATA))
- isc_open(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, POINTER(XSQLDA))¶
isc_open(POINTER(ISC_STATUS), POINTER(isc_tr_handle), STRING, POINTER(XSQLDA))
- isc_open_blob(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(isc_blob_handle), POINTER(ISC_QUAD))¶
isc_open_blob(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(isc_blob_handle), POINTER(ISC_QUAD))
- isc_open_blob2(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(isc_blob_handle), POINTER(ISC_QUAD), ISC_USHORT, STRING)¶
isc_open_blob2(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(isc_blob_handle), POINTER(ISC_QUAD), ISC_USHORT, STRING)
- isc_portable_integer(POINTER(ISC_UCHAR), c_short)¶
isc_portable_integer(POINTER(ISC_UCHAR), c_short)
- isc_prepare(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), STRING, POINTER(c_short), STRING, POINTER(XSQLDA))¶
isc_prepare(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), STRING, POINTER(c_short), STRING, POINTER(XSQLDA))
- isc_prepare_transaction(POINTER(ISC_STATUS), POINTER(isc_tr_handle))¶
isc_prepare_transaction(POINTER(ISC_STATUS), POINTER(isc_tr_handle))
- isc_prepare_transaction2(POINTER(ISC_STATUS), POINTER(isc_tr_handle), ISC_USHORT, POINTER(ISC_UCHAR))¶
isc_prepare_transaction2(POINTER(ISC_STATUS), POINTER(isc_tr_handle), ISC_USHORT, POINTER(ISC_UCHAR))
- isc_print_blr(STRING, ISC_PRINT_CALLBACK, c_void_p, c_short)¶
isc_print_blr(STRING, ISC_PRINT_CALLBACK, c_void_p, c_short)
- isc_print_sqlerror(ISC_SHORT, POINTER(ISC_STATUS))¶
isc_print_sqlerror(ISC_SHORT, POINTER(ISC_STATUS))
- isc_print_status(POINTER(ISC_STATUS))¶
isc_print_status(POINTER(ISC_STATUS))
- isc_put_segment(POINTER(ISC_STATUS), POINTER(isc_blob_handle), c_ushort, c_void_p)¶
isc_put_segment(POINTER(ISC_STATUS), POINTER(isc_blob_handle), c_ushort, c_void_p)
- isc_put_slice(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(ISC_QUAD), c_short, STRING, c_short, POINTER(ISC_LONG), ISC_LONG, c_void_p)¶
isc_put_slice(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), POINTER(ISC_QUAD), c_short, STRING, c_short, POINTER(ISC_LONG), ISC_LONG, c_void_p)
- isc_qtoq(POINTER(ISC_QUAD), POINTER(ISC_QUAD))¶
isc_qtoq(POINTER(ISC_QUAD), POINTER(ISC_QUAD))
- isc_que_events(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(ISC_LONG), c_short, POINTER(ISC_UCHAR), ISC_EVENT_CALLBACK, POINTER(ISC_UCHAR))¶
isc_que_events(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(ISC_LONG), c_short, POINTER(ISC_UCHAR), ISC_EVENT_CALLBACK, POINTER(ISC_UCHAR))
- isc_receive(POINTER(ISC_STATUS), POINTER(isc_req_handle), c_short, c_short, c_void_p, c_short)¶
isc_receive(POINTER(ISC_STATUS), POINTER(isc_req_handle), c_short, c_short, c_void_p, c_short)
- isc_reconnect_transaction(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_short, STRING)¶
isc_reconnect_transaction(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_short, STRING)
- isc_release_request(POINTER(ISC_STATUS), POINTER(isc_req_handle))¶
isc_release_request(POINTER(ISC_STATUS), POINTER(isc_req_handle))
- isc_request_info(POINTER(ISC_STATUS), POINTER(isc_req_handle), c_short, c_short, STRING, c_short, STRING)¶
isc_request_info(POINTER(ISC_STATUS), POINTER(isc_req_handle), c_short, c_short, STRING, c_short, STRING)
- isc_rollback_retaining(POINTER(ISC_STATUS), POINTER(isc_tr_handle))¶
isc_rollback_retaining(POINTER(ISC_STATUS), POINTER(isc_tr_handle))
- isc_rollback_transaction(POINTER(ISC_STATUS), POINTER(isc_tr_handle))¶
isc_rollback_transaction(POINTER(ISC_STATUS), POINTER(isc_tr_handle))
- isc_seek_blob(POINTER(ISC_STATUS), POINTER(isc_blob_handle), c_short, ISC_LONG, POINTER(ISC_LONG))¶
isc_seek_blob(POINTER(ISC_STATUS), POINTER(isc_blob_handle), c_short, ISC_LONG, POINTER(ISC_LONG))
- isc_send(POINTER(ISC_STATUS), POINTER(isc_req_handle), c_short, c_short, c_void_p, c_short)¶
isc_send(POINTER(ISC_STATUS), POINTER(isc_req_handle), c_short, c_short, c_void_p, c_short)
- isc_service_attach(POINTER(ISC_STATUS), c_ushort, STRING, POINTER(isc_svc_handle), c_ushort, STRING)¶
isc_service_attach(POINTER(ISC_STATUS), c_ushort, STRING, POINTER(isc_svc_handle), c_ushort, STRING)
- isc_service_detach(POINTER(ISC_STATUS), POINTER(isc_svc_handle))¶
isc_service_detach(POINTER(ISC_STATUS), POINTER(isc_svc_handle))
- isc_service_query(POINTER(ISC_STATUS), POINTER(isc_svc_handle), POINTER(isc_resv_handle), c_ushort, STRING, c_ushort, STRING, c_ushort, STRING)¶
isc_service_query(POINTER(ISC_STATUS), POINTER(isc_svc_handle), POINTER(isc_resv_handle), c_ushort, STRING, c_ushort, STRING, c_ushort, STRING)
- isc_service_start(POINTER(ISC_STATUS), POINTER(isc_svc_handle), POINTER(isc_resv_handle), c_ushort, STRING)¶
isc_service_start(POINTER(ISC_STATUS), POINTER(isc_svc_handle), POINTER(isc_resv_handle), c_ushort, STRING)
- isc_set_debug(c_int)¶
isc_set_debug(c_int)
- isc_sql_interprete(c_short, STRING, c_short)¶
isc_sql_interprete(c_short, STRING, c_short)
- isc_sqlcode(POINTER(ISC_STATUS))¶
isc_sqlcode(POINTER(ISC_STATUS))
- isc_start_and_send(POINTER(ISC_STATUS), POINTER(isc_req_handle), POINTER(isc_tr_handle), c_short, c_short, c_void_p, c_short)¶
isc_start_and_send(POINTER(ISC_STATUS), POINTER(isc_req_handle), POINTER(isc_tr_handle), c_short, c_short, c_void_p, c_short)
- isc_start_multiple(POINTER(ISC_STATUS), POINTER(isc_tr_handle), c_short, c_void_p)¶
isc_start_multiple(POINTER(ISC_STATUS), POINTER(isc_tr_handle), c_short, c_void_p)
- isc_start_request(POINTER(ISC_STATUS), POINTER(isc_req_handle), POINTER(isc_tr_handle), c_short)¶
isc_start_request(POINTER(ISC_STATUS), POINTER(isc_req_handle), POINTER(isc_tr_handle), c_short)
- isc_start_transaction(POINTER(ISC_STATUS), POINTER(isc_tr_handle), c_short, POINTER(isc_db_handle), c_short, STRING)¶
isc_start_transaction(POINTER(ISC_STATUS), POINTER(isc_tr_handle), c_short, POINTER(isc_db_handle), c_short, STRING)
- isc_transact_request(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, STRING, c_ushort, STRING)¶
isc_transact_request(POINTER(ISC_STATUS), POINTER(isc_db_handle), POINTER(isc_tr_handle), c_ushort, STRING, c_ushort, STRING, c_ushort, STRING)
- isc_transaction_info(POINTER(ISC_STATUS), POINTER(isc_tr_handle), c_short, STRING, c_short, STRING)¶
isc_transaction_info(POINTER(ISC_STATUS), POINTER(isc_tr_handle), c_short, STRING, c_short, STRING)
- isc_unwind_request(POINTER(ISC_STATUS), POINTER(isc_tr_handle), c_short)¶
isc_unwind_request(POINTER(ISC_STATUS), POINTER(isc_tr_handle), c_short)
- isc_vax_integer(STRING, c_short)¶
isc_vax_integer(STRING, c_short)
- isc_version(POINTER(isc_db_handle), ISC_VERSION_CALLBACK, c_void_p)¶
isc_version(POINTER(isc_db_handle), ISC_VERSION_CALLBACK, c_void_p)
- isc_vtof(STRING, STRING, c_ushort)¶
isc_vtof(STRING, STRING, c_ushort)
- isc_vtov(STRING, STRING, c_short)¶
isc_vtov(STRING, STRING, c_short)
- isc_wait_for_event(POINTER(ISC_STATUS), POINTER(isc_db_handle), c_short, POINTER(ISC_UCHAR), POINTER(ISC_UCHAR))¶
isc_wait_for_event(POINTER(ISC_STATUS), POINTER(isc_db_handle), c_short, POINTER(ISC_UCHAR), POINTER(ISC_UCHAR))
BLR Constants¶
Note
BLR data types are defined in fdb.ibase
Main BLR codes¶
|
|
|
|
|
|
|
Other BLR codes¶
|
|
|
|
|
|