| table | name | type | length | noff | flags | readcb | writecb | help |
| rta_tables |
name |
4 |
30 |
0 |
2 |
0 |
0 |
The name of the table. This must be unique in the system. Table names can be at most MXTBLNAME characters in length. See rta.h for details. Note that some table names are reserved for internal use. |
| rta_tables |
address |
1 |
4 |
4 |
2 |
0 |
0 |
The start address of the array of structs that makes up the table. |
| rta_tables |
rowlen |
2 |
4 |
8 |
2 |
0 |
0 |
The length of each struct in the array of structs that makes up the table. |
| rta_tables |
nrows |
2 |
4 |
12 |
2 |
0 |
0 |
The number of rows in the table. |
| rta_tables |
iterator |
1 |
4 |
16 |
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 |
4 |
20 |
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 |
cols |
1 |
4 |
24 |
2 |
0 |
0 |
A pointer to an array of COLDEF structures. There is one COLDEF for each column in the table. |
| rta_tables |
ncol |
2 |
4 |
28 |
2 |
0 |
0 |
The number of columns in the table. |
| rta_tables |
savefile |
4 |
4096 |
32 |
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 |
36 |
2 |
0 |
0 |
A description of the table. |
| rta_columns |
table |
4 |
30 |
0 |
2 |
0 |
0 |
The name of the table that this column belongs to. |
| rta_columns |
name |
4 |
30 |
4 |
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 MXCOLNAME defined in the rta.h file. |
| rta_columns |
type |
2 |
4 |
8 |
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 rta.h for more details. |
| rta_columns |
length |
2 |
4 |
12 |
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 |
4 |
16 |
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 |
20 |
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 rta.h for the associated defines and details. |
| rta_columns |
readcb |
1 |
4 |
24 |
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 |
4 |
28 |
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. |
| rta_columns |
help |
4 |
1000 |
32 |
2 |
0 |
0 |
A brief description of the column. Should include limits, default value, and a description of how to set it. Can contain at most MXHELPSTR characters. |
| rta_dbg |
syserr |
2 |
4 |
0 |
0 |
0 |
0 |
A non-zero value causes a call to syslog() for all system errors such as failed malloc() or save file read failures. |