Main Page | Class Hierarchy | Compound List | Compound Members | Related Pages

Table Class Reference

List of all members.

Detailed Description

A table in the database.

These are created using the Database.createTable () function in the database; you can retrieve existing tables using the Database.table () function in the database as well.

Tables can be modified, but their changes won't be part of the database until flush () is called. Initially, tables don't exist in the database at all, and must be created using flush ().


Public Member Functions

 this (Database db, char[] name)
 Assign the name and database.

bit valid ()
 Return whether the table is valid.

bit modifiable ()
 Return whether this table can be modified.

bit modified ()
 Return whether any changes are waiting to be applied using flush ().

void flush ()
 Flush all changes made to a registered table.

char[] name ()
 Return the name of the table.

void name (char[] value)
 Rename the table.

bit temporary ()
 Return whether this is a temporary table.

void temporary (bit value)
 Assign whether this is a temporary table.

bit registered ()
 Return whether the table has been registered in the database.

void print ()
 Print a description of the table to standard output.

void drop ()
 Delete the table from the database.

Column Management
These methods create and access rows in the table.

Column createColumn (char[] name)
 Add a column to the table.

Column createColumnAfter (char[] name, int index)
 Add a column to the table after an indexed column.

Column createColumnAfter (char[] name, Column column)
 Add a column to the table after a column.

Column createColumnBefore (char[] name, int index)
 Add a column to the table before an indexed column.

Column createColumnBefore (char[] name, Column column)
 Add a column to the table before a column.

int columnCount ()
 Return the number of columns in the table.

Column column (int index)
 Return the zero-indexed column.

Column column (char[] name)
 Return the named column.

Row Management
These methods insert and manage rows in the table.

uint insert (char[] a)
 Insert a row into the table and return its unique identifier.

uint insert (char[] a, char[] b)
 Insert a row into the table and return its unique identifier.

uint insert (char[] a, char[] b, char[] c)
 Insert a row into the table and return its unique identifier.

uint insert (char[] a, char[] b, char[] c, char[] d)
 Insert a row into the table and return its unique identifier.

uint insert (char[] a, char[] b, char[] c, char[] d, char[] e)
 Insert a row into the table and return its unique identifier.

uint insert (char[] a, char[] b, char[] c, char[] d, char[] e, char[] f)
 Insert a row into the table and return its unique identifier.

uint insert (char[] a, char[] b, char[] c, char[] d, char[] e, char[] f, char[] g)
 Insert a row into the table and return its unique identifier.

uint insert (char[] a, char[] b, char[] c, char[] d, char[] e, char[] f, char[] g, char[] h)
 Insert a row into the table and return its unique identifier.

uint insert (char[] a, char[] b, char[] c, char[] d, char[] e, char[] f, char[] g, char[] h, char[] i)
 Insert a row into the table and return its unique identifier.

uint insert (char[] a, char[] b, char[] c, char[] d, char[] e, char[] f, char[] g, char[] h, char[] i, char[] j)
 Insert a row into the table and return its unique identifier.

uint insert (char[][char[]] columns)
 Insert a row into the table and return its unique identifier.

void deleteAllRows ()
 Delete all records in the table.


Member Function Documentation

Column Table.column charname  []  ) 
 

Return the named column.

Column Table.column int  index  ) 
 

Return the zero-indexed column.

int Table.columnCount  ) 
 

Return the number of columns in the table.

Column Table.createColumn charname  []  ) 
 

Add a column to the table.

The command is buffered and the column will be created with flush (), although it will exist in the columnCount () and column () reckonings. If the table is not modifiable, there will be an exception.

Column Table.createColumnAfter charname  [],
Column  column
 

Add a column to the table after a column.

The command is buffered and the column will be created with flush (), although it will exist in the columnCount () and column () reckonings. If the table is not modifiable, there will be an exception.

Column Table.createColumnAfter charname  [],
int  index
 

Add a column to the table after an indexed column.

The command is buffered and the column will be created with flush (), although it will exist in the columnCount () and column () reckonings. If the table is not modifiable, there will be an exception.

Column Table.createColumnBefore charname  [],
Column  column
 

Add a column to the table before a column.

The command is buffered and the column will be created with flush (), although it will exist in the columnCount () and column () reckonings. If the table is not modifiable, there will be an exception.

Column Table.createColumnBefore charname  [],
int  index
 

Add a column to the table before an indexed column.

The command is buffered and the column will be created with flush (), although it will exist in the columnCount () and column () reckonings. If the table is not modifiable, there will be an exception.

void Table.deleteAllRows  ) 
 

Delete all records in the table.

void Table.drop  ) 
 

Delete the table from the database.

It and its contents are immediately removed from the database and cannot be recovered. Non-temporary tables from an attached database cannot be dropped.

void Table.flush  ) 
 

Flush all changes made to a registered table.

Under the worst case, this will require copying the table twice. Unfortunately, the worst case is the most common. If there are no changes buffered, this has no effect.

uint Table.insert char]  columns[][char[]  ) 
 

Insert a row into the table and return its unique identifier.

uint Table.insert chara  [],
charb  [],
charc  [],
chard  [],
chare  [],
charf  [],
charg  [],
charh  [],
chari  [],
charj  []
 

Insert a row into the table and return its unique identifier.

uint Table.insert chara  [],
charb  [],
charc  [],
chard  [],
chare  [],
charf  [],
charg  [],
charh  [],
chari  []
 

Insert a row into the table and return its unique identifier.

uint Table.insert chara  [],
charb  [],
charc  [],
chard  [],
chare  [],
charf  [],
charg  [],
charh  []
 

Insert a row into the table and return its unique identifier.

uint Table.insert chara  [],
charb  [],
charc  [],
chard  [],
chare  [],
charf  [],
charg  []
 

Insert a row into the table and return its unique identifier.

uint Table.insert chara  [],
charb  [],
charc  [],
chard  [],
chare  [],
charf  []
 

Insert a row into the table and return its unique identifier.

uint Table.insert chara  [],
charb  [],
charc  [],
chard  [],
chare  []
 

Insert a row into the table and return its unique identifier.

uint Table.insert chara  [],
charb  [],
charc  [],
chard  []
 

Insert a row into the table and return its unique identifier.

uint Table.insert chara  [],
charb  [],
charc  []
 

Insert a row into the table and return its unique identifier.

uint Table.insert chara  [],
charb  []
 

Insert a row into the table and return its unique identifier.

uint Table.insert chara  []  ) 
 

Insert a row into the table and return its unique identifier.

bit Table.modifiable  ) 
 

Return whether this table can be modified.

Tables which are in this direct database are modifiable.

bit Table.modified  ) 
 

Return whether any changes are waiting to be applied using flush ().

void Table.name charvalue  []  ) 
 

Rename the table.

If the table is not modifiable, there will be an exception. If there is no change, there is no operation. Otherwise this change is buffered and will be applied when flush () is called.

Parameters:
value The name to rename the table to.

char [] Table.name  ) 
 

Return the name of the table.

void Table.print  ) 
 

Print a description of the table to standard output.

bit Table.registered  ) 
 

Return whether the table has been registered in the database.

void Table.temporary bit  value  ) 
 

Assign whether this is a temporary table.

This command is buffered and the change will not be applied until flush () is called.

Parameters:
value The temporary value to change.

bit Table.temporary  ) 
 

Return whether this is a temporary table.

Temporary tables are not visible to other users and will be deleted when the connection is closed. By default, tables are permanent.

Table.this Database  db,
charname  []
 

Assign the name and database.

bit Table.valid  ) 
 

Return whether the table is valid.

The table can become invalid when, for example, two columns are given the same name; the table must be made valid before flush ().


The documentation for this class was generated from the following file:
Generated on Thu Jul 31 08:40:54 2003 for sqlite by doxygen 1.3.2