Quadcap Embeddable Database

com.quadcap.sql.meta.MetaBestRowId Class Reference

Inheritance diagram for com.quadcap.sql.meta.MetaBestRowId:

com.quadcap.sql.meta.MetaCursor com.quadcap.sql.StaticCursor com.quadcap.sql.CursorImpl Externalizable com.quadcap.sql.TupleImpl com.quadcap.sql.Cursor com.quadcap.sql.Tuple Externalizable com.quadcap.sql.Tuple List of all members.

Detailed Description

A Cursor supporting the DatabaseMetaData.getBestRowId() operation.

Author:
Stan Bailes

Definition at line 75 of file MetaBestRowId.java.

Public Member Functions

 MetaBestRowId (Session session, String tableName, int scope, boolean nullable) throws SQLException
 The constructor for this meta cursor finds the "best" index to use for this table, purely based on the index type (and possibly the 'nullable' flag).

int[] getSortColumns ()
 Sort by name, I guess...

boolean checkNullable (Constraint c) throws SQLException
 Do any of the columns in this constraint allow nulls?


Package Functions

Row doColumn (Column col) throws SQLException
 Add one cursor row to describe the specified column.


Static Package Attributes

Column[] cols
int[] sortColumns = { 2 }


Constructor & Destructor Documentation

com.quadcap.sql.meta.MetaBestRowId.MetaBestRowId Session  session,
String  tableName,
int  scope,
boolean  nullable
throws SQLException
 

The constructor for this meta cursor finds the "best" index to use for this table, purely based on the index type (and possibly the 'nullable' flag).

We don't do anything with scope -- best is best for us.

Definition at line 95 of file MetaBestRowId.java.

References com.quadcap.sql.meta.MetaBestRowId.checkNullable(), com.quadcap.sql.meta.MetaBestRowId.cols, com.quadcap.sql.meta.MetaBestRowId.doColumn(), com.quadcap.sql.Constraint.getColumn(), com.quadcap.sql.Constraint.getColumnCount(), com.quadcap.sql.Table.getConstraint(), com.quadcap.sql.Session.getDatabase(), com.quadcap.sql.Table.getNumConstraints(), com.quadcap.sql.Database.getRelation(), com.quadcap.sql.Session.getTableWriteLock(), and com.quadcap.sql.StaticCursor.sort().


Member Function Documentation

boolean com.quadcap.sql.meta.MetaBestRowId.checkNullable Constraint  c  )  throws SQLException
 

Do any of the columns in this constraint allow nulls?

Definition at line 147 of file MetaBestRowId.java.

References com.quadcap.sql.meta.MetaBestRowId.checkNullable().

Referenced by com.quadcap.sql.meta.MetaBestRowId.checkNullable(), and com.quadcap.sql.meta.MetaBestRowId.MetaBestRowId().

Row com.quadcap.sql.meta.MetaBestRowId.doColumn Column  col  )  throws SQLException [package]
 

Add one cursor row to describe the specified column.

Definition at line 159 of file MetaBestRowId.java.

References com.quadcap.sql.meta.MetaBestRowId.doColumn(), com.quadcap.sql.types.Type.getJDBCType(), com.quadcap.sql.types.Type.getPrecision(), com.quadcap.sql.types.Type.getScale(), com.quadcap.sql.types.Type.getTypeName(), and com.quadcap.sql.Row.set().

Referenced by com.quadcap.sql.meta.MetaBestRowId.doColumn(), and com.quadcap.sql.meta.MetaBestRowId.MetaBestRowId().

int [] com.quadcap.sql.meta.MetaBestRowId.getSortColumns  ) 
 

Sort by name, I guess...

Reimplemented from com.quadcap.sql.StaticCursor.

Definition at line 140 of file MetaBestRowId.java.

References com.quadcap.sql.meta.MetaBestRowId.sortColumns.


Member Data Documentation

Column [] com.quadcap.sql.meta.MetaBestRowId.cols [static, package]
 

Initial value:

{ new Column("SCOPE", typeShort), new Column("COLUMN_NAME", typeString), new Column("DATA_TYPE", typeShort), new Column("TYPE_NAME", typeString), new Column("COLUMN_SIZE", typeInt), new Column("BUFFER_LENGTH", typeAny), new Column("DECIMAL_DIGITS", typeInt), new Column("PSEUDO_COLUMN", typeShort) }

Definition at line 76 of file MetaBestRowId.java.

Referenced by com.quadcap.sql.meta.MetaBestRowId.MetaBestRowId().

int [] com.quadcap.sql.meta.MetaBestRowId.sortColumns = { 2 } [static, package]
 

Definition at line 87 of file MetaBestRowId.java.

Referenced by com.quadcap.sql.meta.MetaBestRowId.getSortColumns().