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. | |
|
|
Return the named column.
|
|
|
Return the zero-indexed column.
|
|
|
Return the number of columns in the table.
|
|
|
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. |
|
||||||||||||
|
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. |
|
||||||||||||
|
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. |
|
||||||||||||
|
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. |
|
||||||||||||
|
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. |
|
|
Delete all records in the table.
|
|
|
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. |
|
|
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. |
|
|
Insert a row into the table and return its unique identifier.
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Insert a row into the table and return its unique identifier.
|
|
||||||||||||||||||||||||||||||||||||||||
|
Insert a row into the table and return its unique identifier.
|
|
||||||||||||||||||||||||||||||||||||
|
Insert a row into the table and return its unique identifier.
|
|
||||||||||||||||||||||||||||||||
|
Insert a row into the table and return its unique identifier.
|
|
||||||||||||||||||||||||||||
|
Insert a row into the table and return its unique identifier.
|
|
||||||||||||||||||||||||
|
Insert a row into the table and return its unique identifier.
|
|
||||||||||||||||||||
|
Insert a row into the table and return its unique identifier.
|
|
||||||||||||||||
|
Insert a row into the table and return its unique identifier.
|
|
||||||||||||
|
Insert a row into the table and return its unique identifier.
|
|
|
Insert a row into the table and return its unique identifier.
|
|
|
Return whether this table can be modified. Tables which are in this direct database are modifiable. |
|
|
Return whether any changes are waiting to be applied using flush ().
|
|
|
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.
|
|
|
Return the name of the table.
|
|
|
Print a description of the table to standard output.
|
|
|
Return whether the table has been registered in the database.
|
|
|
Assign whether this is a temporary table. This command is buffered and the change will not be applied until flush () is called.
|
|
|
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. |
|
||||||||||||
|
Assign the name and database.
|
|
|
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 (). |
1.3.2