table | name | type | length | noff | flags | readcb | writecb | help |
rta_tables |
name |
4 |
100 |
0 |
2 |
0 |
0 |
The name of the table. This must be unique in the system. Table names can be at most RTA_MXTBLNAME characters in length. See librta.h for details. Note that some table names are reserved for internal use. |
rta_tables |
address |
1 |
8 |
8 |
2 |
0 |
0 |
The start address of the array of structs that makes up the table. |
rta_tables |
rowlen |
2 |
4 |
16 |
2 |
0 |
0 |
The length of each struct in the array of structs that makes up the table. |
rta_tables |
nrows |
2 |
4 |
20 |
2 |
0 |
0 |
The number of rows in the table. |
rta_tables |
iterator |
1 |
8 |
24 |
2 |
0 |
0 |
The iterator is a function that, given a pointer to a row, returns a pointer to the next row. When passed a NULL as input, the function returns a pointer to the first row of the table. The function return a NULL when asked for the row after the last row. The function is useful to walk through the rows of a linked list. |
rta_tables |
it_info |
1 |
8 |
32 |
2 |
0 |
0 |
This is a pointer to any kind of information that the caller wants returned with each iterator call. For example, you may wish to have one iterator function for all of your linked lists. You could pass in a unique identifier for each table so the function can handle each one as appropriate. |
rta_tables |
insertcb |
1 |
8 |
40 |
2 |
0 |
0 |
The INSERT callback is invoked to add a row to a table. It is used mostly with tables in which the rows are dynamically allocated. |
rta_tables |
deletecb |
1 |
8 |
48 |
2 |
0 |
0 |
The DELETE callback is invoked to remove a row from a table. It is used mostly with tables in which the rows are dynamically allocated. |
rta_tables |
cols |
1 |
8 |
56 |
2 |
0 |
0 |
A pointer to an array of RTA_COLDEF structures. There is one RTA_COLDEF for each column in the table. |
rta_tables |
ncol |
2 |
4 |
64 |
2 |
0 |
0 |
The number of columns in the table. |
rta_tables |
savefile |
4 |
4096 |
72 |
2 |
0 |
0 |
The name of the file with the non-volatile contents of the table. This file is read when the table is initialized and is written any time a column with the non-volatile flag set is modified. |
rta_tables |
help |
4 |
1000 |
80 |
2 |
0 |
0 |
A description of the table. |
rta_columns |
table |
4 |
100 |
0 |
2 |
0 |
0 |
The name of the table that this column belongs to. |
rta_columns |
name |
4 |
100 |
8 |
2 |
0 |
0 |
The name of the column. Must be unique within a table definition but may be replicated in other tables. The maximum string length of the column name is set by RTA_MXCOLNAME defined in the librta.h file. |
rta_columns |
type |
2 |
4 |
16 |
2 |
0 |
0 |
The data type of the column. Types include string, integer, long, pointer, pointer to string, pointer to integer, and pointer to long. See librta.h for more details. |
rta_columns |
length |
2 |
4 |
20 |
2 |
0 |
0 |
The length of the string in bytes if the column data type is a string or a pointer to a string. |
rta_columns |
noff |
1 |
8 |
24 |
2 |
0 |
0 |
The number of bytes from the start of the structure to the member element defined in this entry. Be careful in setting the offset with non word-aligned elements like single characters. If you do no use offsetof() consider using -fpack-struct. (By the way, the column name is actually 'offset' but that conflicts with one of the SQL words |
rta_columns |
flags |
2 |
4 |
28 |
2 |
0 |
0 |
Flags associated with the column include flags to indicate read-only status and whether or not the data should be included in the save file. See librta.h for the associated defines and details. |
rta_columns |
readcb |
1 |
8 |
32 |
2 |
0 |
0 |
A pointer to a function that returns an integer. If defined, the function is called before the column is read. This function is useful to compute values only when needed. A zero is returned by the callback if the callback succeeds. |
rta_columns |
writecb |
1 |
8 |
40 |
2 |
0 |
0 |
A pointer to a function that returns and integer. If defined, the function is called after an UPDATE command modifies the column. All columns in an UPDATE are modified before any write callbacks are executed. This function is useful to effect changes requested or implied by the column definition. The function return a zero on success. If a non-zero value is returned, the SQL client receives an TRIGGERED ACTION EXCEPTION error. |