mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:43:03 +01:00
786 lines
40 KiB
HTML
786 lines
40 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
<HTML>
|
||
<HEAD>
|
||
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
|
||
<TITLE></TITLE>
|
||
<META NAME="GENERATOR" CONTENT="OpenOffice 4.1.2 (Unix)">
|
||
<META NAME="AUTHOR" CONTENT="alex ">
|
||
<META NAME="CREATED" CONTENT="20130531;10003100">
|
||
<META NAME="CHANGEDBY" CONTENT="Alex Peshkoff">
|
||
<META NAME="CHANGED" CONTENT="20160303;18023000">
|
||
<META NAME="CHANGEDBY" CONTENT="Alex Peshkoff">
|
||
<META NAME="CHANGEDBY" CONTENT="Alex Peshkoff">
|
||
<META NAME="CHANGEDBY" CONTENT="Alex Peshkoff">
|
||
<STYLE TYPE="text/css">
|
||
<!--
|
||
@page { size: 8.5in 11in; margin: 0.79in }
|
||
P { margin-bottom: 0.08in }
|
||
-->
|
||
</STYLE>
|
||
</HEAD>
|
||
<BODY LANG="en-US" DIR="LTR">
|
||
<P STYLE="margin-top: 0.17in; margin-bottom: 0.2in; page-break-after: avoid">
|
||
<FONT FACE="Albany, sans-serif"><FONT SIZE=4>Firebird interfaces.</FONT></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Firebird's OO API is based
|
||
on use of interfaces. That interfaces, though looking in some aspects
|
||
like OLE2 interfaces (some of them have addRef() and release()
|
||
methods) are non standard and have features, missing in ither widely
|
||
used types of interfaces. First of all Firebird interfaces are
|
||
</FONT><FONT SIZE=4><B>language independent</B></FONT> – <FONT SIZE=4>that
|
||
means that to define/use them one need not use language specific
|
||
constructions like </FONT><FONT SIZE=4><I>class</I></FONT> <FONT SIZE=4>in
|
||
C++, interface may be defined using any language having concepts of
|
||
array and pointer to procedure/function. Next interfaces are
|
||
</FONT><FONT SIZE=4><SPAN STYLE="font-style: normal"><B>versioned</B></SPAN></FONT>
|
||
– <FONT SIZE=4>i.e. we support different versions of same
|
||
interface. Binary layout of interfaces is designed to support that
|
||
features very efficient (there is no need in additional virtual calls
|
||
like in OLE2/COM with it's </FONT><STRONG><FONT SIZE=4><SPAN STYLE="font-weight: normal">QueryInterface</SPAN></FONT></STRONG><STRONG><FONT SIZE=4>)</FONT></STRONG><STRONG>
|
||
</STRONG><STRONG><FONT SIZE=4><SPAN STYLE="font-weight: normal">but
|
||
it's not convenient for direct use from most languages. Therefore
|
||
language-specific wrappers should better be designed for different
|
||
languages making use of API easier. Currently we have wrappers for
|
||
C++ and Pascal, Java is coming soon. From end-user POV calls from C++
|
||
and Pascal have absolutely no difference, though some additional
|
||
language-specific features present in C++ (like automatic status
|
||
check after API calls) are missing in Pascal.</SPAN></FONT></STRONG></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in; font-weight: normal"><FONT SIZE=4>Typically
|
||
database API is used to access data stored in database. Firebird OO
|
||
API certainly performs this task but in addition it supports writing
|
||
your own </FONT><FONT SIZE=4><B>plugins</B></FONT> – <FONT SIZE=4>modules,
|
||
making it possible to enhance Firebird capabilities according to your
|
||
needs. Therefore this document contains 2 big parts – accessing
|
||
databases and writing plugins. Certainly some interfaces (like status
|
||
vector) are used in both parts of API, they will be discussed in data
|
||
access part and freely referenced later when discussing plugins.
|
||
Therefore even if you plan to write some plugin you should better
|
||
start with the first part of this document. Moreover a lot of plugins
|
||
need to access databases themselves and data access API is typically
|
||
needed for it.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="result_box"></A><FONT SIZE=4><SPAN STYLE="font-weight: normal">Firebird
|
||
installation package contains a number of live samples of use of OO
|
||
API – they are in examples/interfaces (database access) and
|
||
examples/dbcrypt (plugin performing </SPAN></FONT><FONT SIZE=4><SPAN LANG="en">fictitious
|
||
database encryption</SPAN></FONT><FONT SIZE=4><SPAN STYLE="font-weight: normal">)
|
||
directories. It's supposed that the reader is familiar with ISC API
|
||
used in Firebird since interbase times.</SPAN></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-top: 0.17in; margin-bottom: 0.2in; page-break-after: avoid">
|
||
<FONT FACE="Albany, sans-serif"><FONT SIZE=4>Accessing databases.</FONT></FONT></P>
|
||
<H1><FONT SIZE=4>Creating database and attaching to existing
|
||
database.</FONT></H1>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>First of all we need to
|
||
get access to <B>IMaster</B> interface. IMaster is primary Firebird
|
||
interface, required to access all the rest of interfaces. Therefore
|
||
there is a special way of accessing it – the only one needed to use
|
||
OO API plain function called fb_get_master_interface(). This function
|
||
has no parameters and always succeeds. There is one and only one
|
||
instance of IMaster per Firebird client library, therefore one need
|
||
not care about releasing memory, used by master interface. A simplest
|
||
way to access it from your program is to have appropriate global or
|
||
static variable:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>static <A HREF="#Master">IMaster</A>*
|
||
master = fb_get_master_interface();</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>For a lot of methods, used
|
||
in Firebird API, first parameter is <B>IStatus</B> interface. It's a
|
||
logical replacement of ISC_STATUS_ARRAY, but works separately with
|
||
errors and warnings (not mixing them in same array), can contain
|
||
unlimited number of errors inside and (this will be important if you
|
||
plan to implement IStatus yourself) always keeps strings, referenced
|
||
by it, inside interface. Typically you need at least one instance of
|
||
IStatus to call other methods. You obtain it from IMaster:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I><A HREF="#Status">IStatus</A>*
|
||
st = master->getStatus();</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>If method getStatus()
|
||
fails for some reason (OOM for example) it returns NULL – obviously
|
||
we can't use generic error reporting method which is based on use of
|
||
IStatus here.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Now we are going to deal
|
||
with first interface, directly related to database calls. This is
|
||
<A HREF="#Provider">IProvider</A> – interface called this way cause
|
||
it's exactly that interface that must be implemented by any provider
|
||
in Firebird. Firebird client library also has it's own implementation
|
||
of IProvider, which must be used to start any database activity. To
|
||
obtain it we call IMaster's method:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>IProvider* prov =
|
||
master->getDispatcher();</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>When attaching to existing
|
||
database or moreover creating new one it's often necessary to pass a
|
||
lot of additional parameters (logon/password, page size for new
|
||
database, etc.) to API call. Having separate language-level
|
||
parameters is close to unreal – we will have to modify a call too
|
||
often to add new parameters, and number of them will be very big no
|
||
matter of the fact that typically one needs to pass not too much of
|
||
them. Therefore to pass additional parameters special in-memory data
|
||
structure, called </FONT><FONT SIZE=4><I>database parameters block</I></FONT>
|
||
<FONT SIZE=4>(DPB) is used. Format of it is well defined, and it's
|
||
possible to build DPB byte after byte. But it's much easier to use
|
||
special interface </FONT><A HREF="#XpbBuilder"><FONT SIZE=4><B>IXpbBuilder</B></FONT></A><FONT SIZE=4>,
|
||
which simplifies creation of various parameters blocks. To obtain an
|
||
instance of IXpbBuilder you must know one more generic-use interface
|
||
of firebird API – </FONT><A HREF="#Util"><FONT SIZE=4><B>IUtil</B></FONT></A><FONT SIZE=4>.
|
||
It's a kind of placeholder for the calls that do not fit well in
|
||
other places. So we do</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>IUtil* utl =
|
||
master->getUtilInterface();</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>IXpbBuilder* dpb =
|
||
utl->getXpbBuilder(&status, IXpbBuilder::DPB, NULL, 0);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>This creates empty
|
||
parameters' block builder of DPB type. Now adding required parameter
|
||
to it is trivial:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>dpb->insertInt(&status,
|
||
isc_dpb_page_size, 4 * 1024);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>will make firebird to
|
||
create new database with pagesize equal to 4Kb and meaning of</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>dpb->insertString(&status,
|
||
isc_dpb_user_name, “sysdba”);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>dpb->insertString(&status,
|
||
isc_dpb_password, “masterkey”);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>is (I hope) obvious.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><U>The following is C++
|
||
specific: </U>We are almost ready to call createDatabase() method of
|
||
IProvider, but before it a few words about concept of <B>Status
|
||
Wrapper</B> should be said. Status wrapper is not an interface, it's
|
||
very thin envelope for IStatus interface. It helps to customize
|
||
behavior of C++ API (change a way how errors, returned in IStatus
|
||
interface, are processed). For the first time we recommend use of
|
||
<B>ThrowStatusWrapper</B>, which raises C++ exception each time an
|
||
error is returned in IStatus.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>ThrowStatusWrapper
|
||
status(st);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Now we may create new
|
||
empty database:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I><A HREF="#Attachment">IAttachment</A>*
|
||
att = prov->createDatabase(&status, "fbtests.fdb",
|
||
dpb->getBufferLength(&status), dpb->getBuffer(&status));</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>printf("Database
|
||
fbtests.fdb created\n");</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Pay attention that we do
|
||
not check status after the call to createDatabase(), because in case
|
||
of error C++ or Pascal exception will be raised (therefore it's very
|
||
good idea to have try/catch/except syntax in your program). We also
|
||
use two new functions from IXpbBuilder – getBufferLength() and
|
||
getBuffer(), which extract data from interface in native parameters
|
||
block format. As you can see there is no need to check explicitly for
|
||
status of functions, returning intermediate results.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Detaching from just
|
||
created database is trivial:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>att->detach(&status);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Now it remains to enclose
|
||
all operators into <I>try</I> block and write a handler in catch
|
||
block. When using ThrowStatusWrapper you should always catch defined
|
||
in C++ API exception class FbException, in Pascal you must also work
|
||
with class FbException. Exception handler block in simplest case may
|
||
look this way:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>catch (const
|
||
FbException& error)</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>{</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>char buf[256];</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>utl->formatStatus(buf,
|
||
sizeof(buf), error.getStatus());</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>fprintf(stderr, "%s\n",
|
||
buf);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>}</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Pay attention that here we
|
||
use one more function from <A HREF="#Util">IUtil</A> –
|
||
formatStatus(). It returns in buffer text, describing an error
|
||
(warning), stored in IStatus parameter.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>To attach to existing
|
||
database just use attachDatabase() method of IProvider instead
|
||
createDatabase(). All parameters are the same for both methods.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>att =
|
||
prov->attachDatabase(&status, "fbtests.fdb", 0,
|
||
NULL);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>This sample is using no
|
||
additional DPB parameters. Take into account that without
|
||
logon/password any remote connection will fail if no trusted
|
||
authorization plugin is configured. Certainly login info may be also
|
||
provided in environment (in ISC_USER and ISC_PASSWORD variables) like
|
||
it was before.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Our examples contain
|
||
complete samples, dedicated except others to creating databases –
|
||
01.create.cpp and 01.create.pas. When samples are present it will be
|
||
very useful to build and try to run appropriate samples when reading
|
||
this document.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<H1><FONT SIZE=4>Working with transactions.</FONT></H1>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Only creating empty
|
||
databases is definitely not enough to work with RDBMS. We want to be
|
||
able to create various objects (like tables and so on) in database
|
||
and insert data in that tables. Any operation within database is
|
||
performed by firebird under transaction control. Therefore first of
|
||
all we must learn to start transaction. Here we do not discuss
|
||
distributed transactions (supported by <A HREF="#Dtc">IDtc</A>
|
||
interface) to avoid unneeded to most users overcomplication. Starting
|
||
of non-distributed transaction is very simple and done via attachment
|
||
interface:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I><A HREF="#Transaction">ITransaction</A>*
|
||
tra = att->startTransaction(&status, 0, NULL);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>In this sample default
|
||
transaction parameters are used – no TPB is passed to
|
||
startTransaction() method. If you need non-default parameters you may
|
||
create appropriate <A HREF="#XpbBuilder">IXpbBuilder</A>, add
|
||
required items to it:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I><A HREF="#XpbBuilder">IXpbBuilder</A>*
|
||
tpb = utl->getXpbBuilder(&status, IXpbBuilder::TPB, NULL, 0);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>tpb->insertTag(&status,
|
||
isc_tpb_read_committed);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>and pass resulting TPB to
|
||
startTransaction():</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>ITransaction* tra =
|
||
att->startTransaction(&status, tpb->getBufferLength(&status),
|
||
tpb->getBuffer(&status));</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Transaction interface is
|
||
used as a parameter in a lot of other API calls but itself it does
|
||
not perform any actions except commit/rollback transaction, may be
|
||
retaining:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4><I>tra->commit(&status);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>You may take a look at how
|
||
to start and commit transaction in examples 01.create.cpp and
|
||
01.create.pas.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<H1><FONT SIZE=4>Executing SQL operator without input parameters and
|
||
returned rows.</FONT></H1>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>With started transaction
|
||
we are ready to execute our first SQL operators. Used for it
|
||
execute() method in <A HREF="#Attachment">IAttachment</A> is rather
|
||
universal and may be also used to execute SQL operators with input
|
||
and output parameters (which is typical for EXECUTE PROCEDURE
|
||
statement), but right now we will use the simple most form of it.
|
||
Both DDL and DML operators can be executed:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in; font-weight: normal"><FONT SIZE=4><I>att->execute(&status,
|
||
tra, 0, "create table dates_table (d1 date)",
|
||
SQL_DIALECT_V6, NULL, NULL, NULL, NULL);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in; font-weight: normal"><FONT SIZE=4><I>tra->commitRetaining(&status);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in; font-weight: normal"><FONT SIZE=4><I>att->execute(&status,
|
||
tra, 0, "insert into dates_table values (CURRENT_DATE)",
|
||
SQL_DIALECT_V6, NULL, NULL, NULL, NULL);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>As you can see transaction
|
||
interface is a required parameter for execute() method (must be NULL
|
||
only if you execute START TRANSACTION statement). Next follows length
|
||
of SQL operator (may be zero causing use of C rules to determine
|
||
string length), text of operator and SQL dialect that should be used
|
||
for it. The following for NULLs stand for metadata descriptions and
|
||
buffers of input parameters and output data. Complete description of
|
||
this method is provided in <A HREF="#Attachment">IAttachment</A>
|
||
interface.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>You may take a look at how
|
||
to start and commit transaction in examples 01.create.cpp and
|
||
01.create.pas.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<H1><FONT SIZE=4>Executing SQL operator with input parameters.</FONT></H1>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>There are 2 ways to
|
||
execute statement with input parameters. Choice of correct method
|
||
depends upon do you need to execute it more than once and do you know
|
||
in advance format of parameters. When that format is known and
|
||
statement is needed to be run only once single call to
|
||
IAttachment::execute() may be used. In other cases SQL statement
|
||
should be prepared first and after it executed, may be many times
|
||
with different parameters.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>To prepare SQL statement
|
||
for execution use prepare() method of <A HREF="#Attachment">IAttachment</A>
|
||
interface:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"> <FONT SIZE=4><I><A HREF="#Statement">IStatement</A>*
|
||
stmt = att->prepare(&status, tra, 0, “UPDATE department SET
|
||
budget = ? * budget + budget WHERE dept_no = ?”,</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in">
|
||
<FONT SIZE=4><I>SQL_DIALECT_V6,
|
||
IStatement::PREPARE_PREFETCH_METADATA);</I></FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>If you are not going to
|
||
use parameters description from firebird (i.e. format of parameters
|
||
is known to you in advance) please use
|
||
IStatement::PREPARE_PREFETCH_NONE instead PREPARE_PREFETCH_METADATA –
|
||
this will save client/server traffic and server resources a bit.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>In ISC API XSQLDA is used
|
||
to describe format of statement parameters. New API does not use
|
||
XSQLDA – instead interface IMessageMetadata is used. A set of input
|
||
parameters (and also a row fetched from cursor) is described in
|
||
firebird API in same way and later called message. <A HREF="#MessageMetadata">IMessageMetadata</A>
|
||
is passed as a parameter to the methods performing message exchange
|
||
between your program and database engine. There are many ways to have
|
||
an instance of IMessageMetadata – one can:</FONT></P>
|
||
<UL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>get it from
|
||
<A HREF="#Statement">IStatement</A>,</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>build using
|
||
<A HREF="#MetadataBuilder">IMetadataBuilder</A> interface,</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>have your own
|
||
implementation of this interface.</FONT></P>
|
||
</UL>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>We will not discuss own
|
||
implementation here, one may take a look at example
|
||
05.user_metadata.cpp for details.</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="Attachment"></A><FONT SIZE=4>Attachment
|
||
interface:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
getInfo(StatusType* status, unsigned itemsLength, const unsigned
|
||
char* items, unsigned bufferLength, unsigned char* buffer)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ITransaction*
|
||
startTransaction(StatusType* status, unsigned tpbLength, const
|
||
unsigned char* tpb)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ITransaction*
|
||
reconnectTransaction(StatusType* status, unsigned length, const
|
||
unsigned char* id)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IRequest*
|
||
compileRequest(StatusType* status, unsigned blrLength, const
|
||
unsigned char* blr)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
transactRequest(StatusType* status, ITransaction* transaction,
|
||
unsigned blrLength, const unsigned char* blr, unsigned inMsgLength,
|
||
const unsigned char* inMsg, unsigned outMsgLength, unsigned char*
|
||
outMsg)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IBlob*
|
||
createBlob(StatusType* status, ITransaction* transaction, ISC_QUAD*
|
||
id, unsigned bpbLength, const unsigned char* bpb)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IBlob*
|
||
openBlob(StatusType* status, ITransaction* transaction, ISC_QUAD*
|
||
id, unsigned bpbLength, const unsigned char* bpb)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>int
|
||
getSlice(StatusType* status, ITransaction* transaction, ISC_QUAD*
|
||
id, unsigned sdlLength, const unsigned char* sdl, unsigned
|
||
paramLength, const unsigned char* param, int sliceLength, unsigned
|
||
char* slice)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
putSlice(StatusType* status, ITransaction* transaction, ISC_QUAD*
|
||
id, unsigned sdlLength, const unsigned char* sdl, unsigned
|
||
paramLength, const unsigned char* param, int sliceLength, unsigned
|
||
char* slice)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
executeDyn(StatusType* status, ITransaction* transaction, unsigned
|
||
length, const unsigned char* dyn)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IStatement*
|
||
prepare(StatusType* status, ITransaction* tra, unsigned stmtLength,
|
||
const char* sqlStmt, unsigned dialect, unsigned flags)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ITransaction*
|
||
execute(StatusType* status, ITransaction* transaction, unsigned
|
||
stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata*
|
||
inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void*
|
||
outBuffer)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IResultSet*
|
||
openCursor(StatusType* status, ITransaction* transaction, unsigned
|
||
stmtLength, const char* sqlStmt, unsigned dialect, IMessageMetadata*
|
||
inMetadata, void* inBuffer, IMessageMetadata* outMetadata, const
|
||
char* cursorName, unsigned cursorFlags)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IEvents*
|
||
queEvents(StatusType* status, IEventCallback* callback, unsigned
|
||
length, const unsigned char* events)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
cancelOperation(StatusType* status, int option)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void ping(StatusType*
|
||
status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
detach(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
dropDatabase(StatusType* status)</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="Dtc"></A><FONT SIZE=4>Dtc
|
||
interface:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ITransaction*
|
||
join(StatusType* status, ITransaction* one, ITransaction* two)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IDtcStart*
|
||
startBuilder(StatusType* status)</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="DtcStart"></A><FONT SIZE=4>DtcStart
|
||
interface:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
addAttachment(StatusType* status, IAttachment* att)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
addWithTpb(StatusType* status, IAttachment* att, unsigned length,
|
||
const unsigned char* tpb)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ITransaction*
|
||
start(StatusType* status)</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="Master"></A><FONT SIZE=4>Master
|
||
interface:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IStatus* getStatus()</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IProvider*
|
||
getDispatcher()</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IPluginManager*
|
||
getPluginManager()</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ITimerControl*
|
||
getTimerControl()</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IDtc* getDtc()</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IUtil*
|
||
getUtilInterface()</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IConfigManager*
|
||
getConfigManager()</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="MessageMetadata"></A><FONT SIZE=4>MessageMetadata
|
||
interface:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getCount(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>const char*
|
||
getField(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>const char*
|
||
getRelation(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>const char*
|
||
getOwner(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>const char*
|
||
getAlias(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getType(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>FB_BOOLEAN
|
||
isNullable(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>int
|
||
getSubType(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getLength(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>int
|
||
getScale(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getCharSet(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getOffset(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getNullOffset(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IMetadataBuilder*
|
||
getBuilder(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getMessageLength(StatusType* status)</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="MetadataBuilder"></A><FONT SIZE=4>MetadataBuilder
|
||
interface:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
setType(StatusType* status, unsigned index, unsigned type)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
setSubType(StatusType* status, unsigned index, int subType)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
setLength(StatusType* status, unsigned index, unsigned length)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
setCharSet(StatusType* status, unsigned index, unsigned charSet)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
setScale(StatusType* status, unsigned index, unsigned scale)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
truncate(StatusType* status, unsigned count)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
moveNameToIndex(StatusType* status, const char* name, unsigned
|
||
index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
remove(StatusType* status, unsigned index)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
addField(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IMessageMetadata*
|
||
getMetadata(StatusType* status)</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="Provider"></A><FONT SIZE=4>Provider
|
||
interface:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IAttachment*
|
||
attachDatabase(StatusType* status, const char* fileName, unsigned
|
||
dpbLength, const unsigned char* dpb)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IAttachment*
|
||
createDatabase(StatusType* status, const char* fileName, unsigned
|
||
dpbLength, const unsigned char* dpb)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IService*
|
||
attachServiceManager(StatusType* status, const char* service,
|
||
unsigned spbLength, const unsigned char* spb)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
shutdown(StatusType* status, unsigned timeout, const int reason)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
setDbCryptCallback(StatusType* status, ICryptKeyCallback*
|
||
cryptCallback)</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="Statement"></A><FONT SIZE=4>Statement
|
||
interface:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
getInfo(StatusType* status, unsigned itemsLength, const unsigned
|
||
char* items, unsigned bufferLength, unsigned char* buffer)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getType(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>const char*
|
||
getPlan(StatusType* status, FB_BOOLEAN detailed)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ISC_UINT64
|
||
getAffectedRecords(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IMessageMetadata*
|
||
getInputMetadata(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IMessageMetadata*
|
||
getOutputMetadata(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ITransaction*
|
||
execute(StatusType* status, ITransaction* transaction,
|
||
IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata*
|
||
outMetadata, void* outBuffer)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IResultSet*
|
||
openCursor(StatusType* status, ITransaction* transaction,
|
||
IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata*
|
||
outMetadata, unsigned flags)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
setCursorName(StatusType* status, const char* name)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void free(StatusType*
|
||
status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getFlags(StatusType* status)</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Constants defined by
|
||
Statement interface:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>PREPARE_PREFETCH_NONE = 0;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>PREPARE_PREFETCH_TYPE = 1;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>PREPARE_PREFETCH_INPUT_PARAMETERS
|
||
= 2;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>PREPARE_PREFETCH_OUTPUT_PARAMETERS
|
||
= 4;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>PREPARE_PREFETCH_LEGACY_PLAN
|
||
= 8;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>PREPARE_PREFETCH_DETAILED_PLAN
|
||
= 16;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>PREPARE_PREFETCH_AFFECTED_RECORDS
|
||
= 32;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>PREPARE_PREFETCH_FLAGS =
|
||
64;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>PREPARE_PREFETCH_METADATA</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>PREPARE_PREFETCH_ALL </FONT>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>FLAG_HAS_CURSOR = 1;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>FLAG_REPEAT_EXECUTE = 2;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>CURSOR_TYPE_SCROLLABLE =
|
||
1;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="Status"></A><FONT SIZE=4>Status
|
||
interface:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void init()</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned getState()</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
setErrors2(unsigned length, const intptr_t* value)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
setWarnings2(unsigned length, const intptr_t* value)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void setErrors(const
|
||
intptr_t* value)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
setWarnings(const intptr_t* value)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>const intptr_t*
|
||
getErrors()</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>const intptr_t*
|
||
getWarnings()</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IStatus* clone()</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Constants defined by
|
||
Status interface:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>STATE_WARNINGS - </FONT>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>STATE_ERRORS</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>RESULT_ERROR = -1;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>RESULT_OK = 0;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>RESULT_NO_DATA = 1;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>RESULT_SEGMENT = 2;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="Transaction"></A><FONT SIZE=4>Transaction
|
||
interface:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
getInfo(StatusType* status, unsigned itemsLength, const unsigned
|
||
char* items, unsigned bufferLength, unsigned char* buffer)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
prepare(StatusType* status, unsigned msgLength, const unsigned char*
|
||
message)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
commit(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
commitRetaining(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
rollback(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
rollbackRetaining(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
disconnect(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ITransaction*
|
||
join(StatusType* status, ITransaction* transaction)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ITransaction*
|
||
validate(StatusType* status, IAttachment* attachment)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ITransaction*
|
||
enterDtc(StatusType* status)</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="Util"></A><FONT SIZE=4>Util
|
||
methods:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
getFbVersion(StatusType* status, IAttachment* att, IVersionCallback*
|
||
callback)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
loadBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att,
|
||
ITransaction* tra, const char* file, FB_BOOLEAN txt)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
dumpBlob(StatusType* status, ISC_QUAD* blobId, IAttachment* att,
|
||
ITransaction* tra, const char* file, FB_BOOLEAN txt)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
getPerfCounters(StatusType* status, IAttachment* att, const char*
|
||
countersSet, ISC_INT64* counters)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IAttachment*
|
||
executeCreateDatabase(StatusType* status, unsigned stmtLength, const
|
||
char* creatDBstatement, unsigned dialect, FB_BOOLEAN*
|
||
stmtIsCreateDb)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
decodeDate(ISC_DATE date, unsigned* year, unsigned* month, unsigned*
|
||
day)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
decodeTime(ISC_TIME time, unsigned* hours, unsigned* minutes,
|
||
unsigned* seconds, unsigned* fractions)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ISC_DATE
|
||
encodeDate(unsigned year, unsigned month, unsigned day)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ISC_TIME
|
||
encodeTime(unsigned hours, unsigned minutes, unsigned seconds,
|
||
unsigned fractions)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
formatStatus(char* buffer, unsigned bufferSize, IStatus* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getClientVersion()</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>IXpbBuilder*
|
||
getXpbBuilder(StatusType* status, unsigned kind, const unsigned
|
||
char* buf, unsigned len)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
setOffsets(StatusType* status, IMessageMetadata* metadata,
|
||
IOffsetsCallback* callback)</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><A NAME="XpbBuilder"></A><FONT SIZE=4>XpbBuilder
|
||
methods:</FONT></P>
|
||
<OL>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
clear(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
removeCurrent(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
insertInt(StatusType* status, unsigned char tag, int value)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
insertBigInt(StatusType* status, unsigned char tag, ISC_INT64 value)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
insertBytes(StatusType* status, unsigned char tag, const void*
|
||
bytes, unsigned length)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
insertTag(StatusType* status, unsigned char tag)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>FB_BOOLEAN
|
||
isEof(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
moveNext(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>void
|
||
rewind(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>FB_BOOLEAN
|
||
findFirst(StatusType* status, unsigned char tag)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>FB_BOOLEAN
|
||
findNext(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned char
|
||
getTag(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getLength(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>int
|
||
getInt(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>ISC_INT64
|
||
getBigInt(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>const char*
|
||
getString(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>const unsigned char*
|
||
getBytes(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>unsigned
|
||
getBufferLength(StatusType* status)</FONT></P>
|
||
<LI><P STYLE="margin-bottom: 0in"><FONT SIZE=4>const unsigned char*
|
||
getBuffer(StatusType* status)</FONT></P>
|
||
</OL>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>Constants defined by
|
||
XpbBuilder interface:</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>static const unsigned DPB
|
||
= 1;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>static const unsigned
|
||
SPB_ATTACH = 2;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>static const unsigned
|
||
SPB_START = 3;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><FONT SIZE=4>static const unsigned TPB
|
||
= 4;</FONT></P>
|
||
<P STYLE="margin-bottom: 0in"><BR>
|
||
</P>
|
||
</BODY>
|
||
</HTML> |