Class Hierarchy    Previous  Next  Index

Class COM.cloudscape.synchronization.StatementListVTI

java.lang.Object
    |
    +----COM.cloudscape.vti.VTITemplate
            |
            +----COM.cloudscape.synchronization.StatementListVTI

public class StatementListVTI
extends VTITemplate
Copyright © 1998-2000, Informix Software, Inc. All rights reserved.

Virtual Table to wrap a list of Replicated Statements. This Virtual Table can be used on
  1. A file created by the COPY PUBLICATION statement
  2. A statement list nested inside a transaction being read by a TransactionListVTI
This Virtual Table has the following shape:

COLUMN NAME DATATYPE DESCRIPTION
STATEMENT_NUMBER int statement number
TYPE varchar(15) One of the following: "COPY PREAMBLE", "DDL", "INSERT", "DELETE", "UPDATE", "WORK UNIT"
SUMMARY String brief description of statement
SUCCESS char(1) 'T' if the statement succeeded during replay, 'F' if it failed
CHANGED_COLUMNS BitSet BitSet of column IDs changed by this statement (null unless this is an UPDATE)
ROW_LIST ColumnResultSet A RowListVTI. null for "COPY PUBLICATION PREAMBLE" and "DDL". For a "WORK UNIT", the rowList has one row, the parameter tuple. See RowListVTI for a description of the layout of the row set for "INSERT", "DELETE", "UPDATE".

ROW_LIST varies depending on the value of TYPE.
  1. If TYPE is "COPY PUBLICATION PREAMBLE" or "DDL", ROW_LIST is null
  2. If TYPE is "WORK UNIT", ROW_LIST holds the work unit parameters. If the WorkUnit took no parameters, ROW_LIST is null.
  3. If TYPE is "INSERT", "DELETE", or "UPDATE", ROW_LIST is a row set. See RowListVTI for a description of the row set's layout.
Here's the SQL for creating a StatementListVTI on a file produced by the COPY PUBLICATION command:
SELECT * FROM new COM.cloudscape.synchronization.StatementListVTI( 'copy', 'p.cpy' ) SL
Here's the SQL stuffed inside a ColumnResultSet used for creating a StatementListVTI on the statement list inside a transaction in a TransactionListVTI or the statement list inside a DML rowset. The arguments are ( scanID, transactionNumber, nestingLevel, summaryColumnLength ).
SELECT * FROM new COM.cloudscape.synchronization.StatementListVTI
( '8000001c-00d0-fd77-3ed8-000a0a0b1900', 3, 0, 20 ) SL


Constructor Index

 o StatementListVTI(String, int, int, int)
Make a StatementListVTI from an open transaction stream.
 o StatementListVTI(String, String, int)
Make a StatementListVTI from a file, e.g., a file created by the COPY PUBLICATION command.

Method Index

 o close()
 
 o eatRestOfStatement(FormatIdInputStream, TokenReader)
 
 o getInt(int)
 
 o getMetaData()
 
 o getObject(int)
 
 o getString(int)
 
 o next()
 
 o skipRowData(TokenReader)
 
 o wasNull()
 

Constructor Detail

 o StatementListVTI
public StatementListVTI(java.lang.String fileType,
                        java.lang.String fileName,
                        int summaryColumnLength) throws java.sql.SQLException
          Make a StatementListVTI from a file, e.g., a file created by the COPY PUBLICATION command.
Parameters:
fileType - kind of file: "copy"
fileName - file of replicated statements
summaryColumnLength - display length of SUMMARY column
Throws:
java.sql.SQLException - thrown on error
 o StatementListVTI
public StatementListVTI(java.lang.String scanID,
                        int transactionNumber,
                        int nestingLevel,
                        int summaryColumnLength) throws java.sql.SQLException
          Make a StatementListVTI from an open transaction stream.
Parameters:
scanID - identifies the stream of replicated transactions
transactionNumber - identifies the transaction in that stream
nestingLevel - identifies statement depth inside this transaction
summaryColumnLength - display length of SUMMARY column
Throws:
java.sql.SQLException - thrown on error

Method Detail

 o wasNull
public boolean wasNull()
Overrides:
wasNull in class VTITemplate
 o next
public boolean next() throws java.sql.SQLException
Throws:
java.sql.SQLException - thrown on error
 o getMetaData
public java.sql.ResultSetMetaData getMetaData()
 o getInt
public int getInt(int columnIndex) throws java.sql.SQLException
Throws:
java.sql.SQLException - thrown on error
Overrides:
getInt in class VTITemplate
 o getString
public java.lang.String getString(int columnIndex) throws java.sql.SQLException
Throws:
java.sql.SQLException - thrown on error
Overrides:
getString in class VTITemplate
 o getObject
public java.lang.Object getObject(int columnIndex) throws java.sql.SQLException
Throws:
java.sql.SQLException - thrown on error
Overrides:
getObject in class VTITemplate
 o close
public void close() throws java.sql.SQLException
Throws:
java.sql.SQLException - thrown on error
 o eatRestOfStatement
protected static void eatRestOfStatement(COM.cloudscape.protocol.BasicServices.StoredFormat.FormatIdInputStream inputStream,
                                         COM.cloudscape.internalUtil.TokenReader streamTokenizer) throws java.sql.SQLException
 o skipRowData
protected static void skipRowData(COM.cloudscape.internalUtil.TokenReader streamTokenizer) throws java.sql.SQLException

  Class Hierarchy    Previous  Next  Index