![]() |
Quadcap Embeddable Database |
Inheritance diagram for com.quadcap.sql.Table:

Definition at line 88 of file Table.java.
Public Member Functions | |
| Table () | |
| Default constructor (required for deserialization). | |
| Table (String tableName, int modifiers) | |
| Explicit constructor. | |
| boolean | isUnderConstruction () |
| Get/Set the value of the 'is under construction' flag. | |
| void | setUnderConstruction (boolean v) |
| Set the value of the 'is under construction' flag. | |
| int | getModifiers () |
| Return the modifier bits for this table. | |
| boolean | hasBlobs () throws SQLException |
| Are any of this table's columns BLOB (or CLOB) types? | |
| void | readExternal (ObjectInput in) throws IOException, ClassNotFoundException |
| Read me from a stream. | |
| void | writeExternal (ObjectOutput out) throws IOException |
| Write me to a stream. | |
| void | addColumn (Column col) throws SQLException |
| Add a column to the table; called during initial table construction only. | |
| final Constraint | getConstraint (int num) |
| Return the specified table constraint (zero-based). | |
| final int | getNumConstraints () |
| Return the number of table constraints. | |
| Constraint | getConstraint (String name) |
| Get the constraint with the specified name. | |
| UniqueConstraint | getPrimaryKey () |
| Return the table's primary key constraint, if it is defined, otherwise return null. | |
| void | nameConstraint (Constraint c) |
| Generate a unique, semi-meaningful, name for this constratint, in case the user didn't specify one. | |
| void | addConstraint (Constraint c) throws SQLException |
| Add a table constraint. | |
| void | deleteConstraint (String name) throws SQLException, IOException |
| Delete the specified table constraint. | |
| void | deleteColumn (int c) throws SQLException, IOException |
| Delete a column from this table, and reset any column-constraint mappings. | |
| void | resetColumnConstraints () throws SQLException |
| Reset any constraint-column mapping (typically after a column has been added or dropped). | |
| Cursor | getCursor (Session session, Expression where, String asName, Cursor outer) throws SQLException |
| Return a cursor on this table. | |
| Cursor | getCursor (Session session, Expression where, String asName) throws SQLException |
| IndexCursor | getCursor (Session session, IndexConstraint notMe) throws SQLException |
| String | getType () |
| My SQL type. | |
| boolean | isUpdatable () |
| (haiku-comment) I am a table and therefore updateable | |
| String | toString () |
| String representation for debugging. | |
| void | insertRow (Session session, Row row) throws SQLException, IOException |
Static Public Member Functions | |
| final long | putRow (Session session, Tuple t, Row row) throws SQLException, IOException |
| Convenience method to write a new row to the database. | |
Static Public Attributes | |
| final int | TEMPORARY = 1 |
| Table modifiers, bit fields. | |
| final int | LOCAL = 2 |
| final int | GLOBAL = 4 |
| final int | STATEMENT_TEMP = 8 |
Package Functions | |
| Row | getRow (Database db, long rowId) throws IOException, SQLException |
| Hashtable | getNames (Expression ex) |
| final IndexConstraint | getAnyIndex (Session session) throws IOException, SQLException |
| final IndexConstraint | getIndexForNames (Session session, Hashtable names) throws IOException, SQLException |
| final IndexConstraint | getAnyIndexBut (Session session, IndexConstraint notMe) throws IOException, SQLException |
| IndexConstraint | getIndexConstraint (Session session, Hashtable names, IndexConstraint notMe) throws IOException, SQLException |
| UniqueConstraint | getIndexForColumns (int[] cols) throws SQLException |
Static Package Functions | |
| final String | strip (String s) |
| Write (an already serialized) row to the database. | |
Package Attributes | |
| int | modifiers = 0 |
| Constraint[] | constraints = new Constraint[0] |
| transient boolean | underConstruction = false |
| transient int | hasBlobs = 0 |
| long | tableIdentity = 1 |
| For in-memory mode, the table identity. | |
|
|
Default constructor (required for deserialization).
Definition at line 115 of file Table.java. |
|
||||||||||||
|
Explicit constructor.
Definition at line 120 of file Table.java. |
|
|
Add a column to the table; called during initial table construction only.
Reimplemented from com.quadcap.sql.TupleImpl. Definition at line 191 of file Table.java. References com.quadcap.sql.Table.addColumn(), and com.quadcap.sql.Constraint.setColumn(). Referenced by com.quadcap.sql.Table.addColumn(), com.quadcap.sql.SQLParser.createTableStmt(), com.quadcap.sql.AddColumn.redo(), and com.quadcap.sql.DropColumn.undo(). |
|
|
Add a table constraint.
Definition at line 267 of file Table.java. References com.quadcap.sql.Table.addConstraint(), com.quadcap.sql.Table.constraints, com.quadcap.sql.Constraint.getPriority(), com.quadcap.sql.Column.setNullable(), and com.quadcap.sql.Constraint.setTable(). Referenced by com.quadcap.sql.Table.addConstraint(), com.quadcap.sql.AddConstraint.redo(), and com.quadcap.sql.DeleteConstraint.undo(). |
|
|
Delete a column from this table, and reset any column-constraint mappings.
Reimplemented from com.quadcap.sql.TupleImpl. Definition at line 326 of file Table.java. References com.quadcap.sql.Table.deleteColumn(), and com.quadcap.sql.Table.resetColumnConstraints(). Referenced by com.quadcap.sql.Table.deleteColumn(), com.quadcap.sql.DropColumn.redo(), and com.quadcap.sql.AddColumn.undo(). |
|
|
Delete the specified table constraint.
Definition at line 301 of file Table.java. References com.quadcap.sql.Table.constraints, com.quadcap.sql.Table.deleteConstraint(), com.quadcap.sql.TupleImpl.getName(), and com.quadcap.sql.Constraint.getName(). Referenced by com.quadcap.sql.Table.deleteConstraint(), com.quadcap.sql.DeleteConstraint.redo(), and com.quadcap.sql.AddConstraint.undo(). |
|
|
Definition at line 449 of file Table.java. References com.quadcap.sql.Table.getAnyIndex(), and com.quadcap.sql.Table.getIndexConstraint(). Referenced by com.quadcap.sql.StmtDropTable.execute(), com.quadcap.sql.StmtDropColumn.execute(), com.quadcap.sql.StmtAddColumn.execute(), and com.quadcap.sql.Table.getAnyIndex(). |
|
||||||||||||
|
Definition at line 461 of file Table.java. References com.quadcap.sql.Table.getAnyIndexBut(), and com.quadcap.sql.Table.getIndexConstraint(). Referenced by com.quadcap.sql.Table.getAnyIndexBut(), and com.quadcap.sql.Table.getCursor(). |
|
|
Get the constraint with the specified name. XXX Maybe we should profile this sucker. A hashtable? Definition at line 221 of file Table.java. References com.quadcap.sql.Table.constraints, and com.quadcap.sql.Constraint.getName(). |
|
|
||||||||||||
|
Definition at line 418 of file Table.java. References com.quadcap.sql.Table.getAnyIndexBut(), and com.quadcap.sql.TupleImpl.getName(). |
|
||||||||||||||||
|
Definition at line 411 of file Table.java. |
|
||||||||||||||||||||
|
Return a cursor on this table.
Implements com.quadcap.sql.Relation. Definition at line 393 of file Table.java. References com.quadcap.sql.Table.getCursor(), com.quadcap.sql.Table.getIndexForNames(), com.quadcap.sql.TupleImpl.getName(), and com.quadcap.sql.Table.getNames(). Referenced by com.quadcap.sql.IndexConstraint.add(), com.quadcap.sql.ImportedKeyConstraint.add(), com.quadcap.sql.CheckConstraint.add(), and com.quadcap.sql.Table.getCursor(). |
|
||||||||||||||||
|
|
Definition at line 543 of file Table.java. References com.quadcap.sql.Table.constraints, com.quadcap.sql.Constraint.getColumns(), and com.quadcap.sql.Table.getIndexForColumns(). Referenced by com.quadcap.sql.ImportedKeyConstraint.checkInsert(), com.quadcap.sql.ForeignKeyConstraint.getFCols(), and com.quadcap.sql.Table.getIndexForColumns(). |
|
||||||||||||
|
Definition at line 455 of file Table.java. References com.quadcap.sql.Table.getIndexConstraint(), and com.quadcap.sql.Table.getIndexForNames(). Referenced by com.quadcap.sql.Table.getCursor(), and com.quadcap.sql.Table.getIndexForNames(). |
|
|
Return the modifier bits for this table.
Definition at line 139 of file Table.java. References com.quadcap.sql.Table.modifiers. Referenced by com.quadcap.sql.Database.checkViewDependency(). |
|
|
Definition at line 443 of file Table.java. References com.quadcap.sql.Table.getNames(), com.quadcap.sql.Table.GetNames.t, and com.quadcap.sql.Table.GetNames.visit(). Referenced by com.quadcap.sql.Table.getCursor(), and com.quadcap.sql.Table.getNames(). |
|
|
|
Return the table's primary key constraint, if it is defined, otherwise return null.
Definition at line 235 of file Table.java. References com.quadcap.sql.Table.constraints. Referenced by com.quadcap.sql.ForeignKeyConstraint.getFCols(). |
|
||||||||||||
|
Definition at line 384 of file Table.java. References com.quadcap.sql.TupleImpl.getColumnCount(), and com.quadcap.sql.Table.getRow(). Referenced by com.quadcap.sql.Table.getRow(), and com.quadcap.sql.UpdateRow.prepare(). |
|
|
My SQL type.
Implements com.quadcap.sql.Relation. Definition at line 565 of file Table.java. References com.quadcap.sql.Table.GLOBAL, com.quadcap.sql.Table.LOCAL, com.quadcap.sql.Table.modifiers, and com.quadcap.sql.Table.TEMPORARY. |
|
|
Are any of this table's columns BLOB (or CLOB) types?
Implements com.quadcap.sql.Relation. Definition at line 144 of file Table.java. References com.quadcap.sql.TupleImpl.getColumnCount(), and com.quadcap.sql.Column.getType(). |
|
||||||||||||
|
Implements com.quadcap.sql.Relation. Definition at line 601 of file Table.java. References com.quadcap.sql.Table.insertRow(). Referenced by com.quadcap.sql.Table.insertRow(). |
|
|
Get/Set the value of the 'is under construction' flag. This is used to determine when ADD CONSTRAINT really has work to do ;-) Definition at line 129 of file Table.java. References com.quadcap.sql.Table.underConstruction. Referenced by com.quadcap.sql.ImportedKeyConstraint.add(), com.quadcap.sql.CheckConstraint.add(), and com.quadcap.sql.AutoNumberConstraint.add(). |
|
|
(haiku-comment) I am a table and therefore updateable
Implements com.quadcap.sql.Relation. Definition at line 582 of file Table.java. |
|
|
Generate a unique, semi-meaningful, name for this constratint, in case the user didn't specify one.
Definition at line 252 of file Table.java. References com.quadcap.sql.Table.constraints, com.quadcap.sql.Constraint.getName(), com.quadcap.sql.Table.nameConstraint(), and com.quadcap.sql.Constraint.setName(). Referenced by com.quadcap.sql.AddConstraint.AddConstraint(), com.quadcap.sql.StmtDropConstraint.execute(), com.quadcap.sql.StmtCreateIndex.execute(), and com.quadcap.sql.Table.nameConstraint(). |
|
||||||||||||||||
|
Convenience method to write a new row to the database.
Definition at line 346 of file Table.java. References com.quadcap.sql.Table.putRow(). Referenced by com.quadcap.sql.Table.putRow(). |
|
|
Read me from a stream.
Reimplemented from com.quadcap.sql.TupleImpl. Definition at line 161 of file Table.java. References com.quadcap.sql.Table.constraints, com.quadcap.sql.Table.readExternal(), and com.quadcap.sql.Constraint.setTable(). Referenced by com.quadcap.sql.Table.readExternal(). |
|
|
Reset any constraint-column mapping (typically after a column has been added or dropped).
Definition at line 335 of file Table.java. References com.quadcap.sql.Table.getNumConstraints(), and com.quadcap.sql.Constraint.resetColumns(). Referenced by com.quadcap.sql.Table.deleteColumn(), and com.quadcap.sql.StmtAddColumn.execute(). |
|
|
Set the value of the 'is under construction' flag.
Definition at line 134 of file Table.java. References com.quadcap.sql.Table.setUnderConstruction(), and com.quadcap.sql.Table.underConstruction. Referenced by com.quadcap.sql.StmtCreateTable.execute(), and com.quadcap.sql.Table.setUnderConstruction(). |
|
|
Write (an already serialized) row to the database.
Definition at line 378 of file Table.java. References com.quadcap.sql.Table.strip(). Referenced by com.quadcap.sql.Table.strip(). |
|
|
String representation for debugging.
Reimplemented from com.quadcap.sql.TupleImpl. Definition at line 588 of file Table.java. References com.quadcap.sql.Table.constraints. |
|
|
Write me to a stream.
Reimplemented from com.quadcap.sql.TupleImpl. Definition at line 179 of file Table.java. References com.quadcap.sql.Table.constraints, and com.quadcap.sql.Table.writeExternal(). Referenced by com.quadcap.sql.Table.writeExternal(). |
|
|
|
Definition at line 104 of file Table.java. Referenced by com.quadcap.sql.Table.getType(). |
|
|
Definition at line 96 of file Table.java. Referenced by com.quadcap.sql.DeletedRows.finish(), com.quadcap.sql.UpdateRow.redo(), and com.quadcap.sql.InsertRow.redo(). |
|
|
Definition at line 103 of file Table.java. Referenced by com.quadcap.sql.Table.getType(). |
|
|
Definition at line 91 of file Table.java. Referenced by com.quadcap.sql.Table.getModifiers(), and com.quadcap.sql.Table.getType(). |
|
|
Definition at line 105 of file Table.java. |
|
|
For in-memory mode, the table identity.
Definition at line 110 of file Table.java. Referenced by com.quadcap.sql.Database.getTableIdentity(), and com.quadcap.sql.Database.updateTableIdentity(). |
|
|
Table modifiers, bit fields. If temporary, either global or local must be specified. Definition at line 102 of file Table.java. Referenced by com.quadcap.sql.Table.getType(). |
|
|
Definition at line 93 of file Table.java. Referenced by com.quadcap.sql.Table.isUnderConstruction(), and com.quadcap.sql.Table.setUnderConstruction(). |