PHILOSOPHY
Element IDs are part of the OFFLINE Calibrations data primary key.
This is the mechanism that allows more the one row of data returned per time stamp (beginTime).
If the elementID is not set to 0 and is set to n, the API will return between 1 and n rows depending on how many rows have be inserted into the database.
A change INCREASING the elementID is backward compatable with a table that had element ID originally set to 0. The only thing to watch out for is a message that will read something like n rows looked for 1 return.
IMPLIMENTATION
In order for this to work three actions need to be taken:
1) Insert the rows with the element ID incrementing 1,2,3...
2) an new table called blahIDs needs to be created - the syntax is important and blah should be replaced with something descriptive.
3) in the nodes table identify the index by update in relevant node (table) and update the index feild with blah
For example the pmd SMCalib table wants to return 24 rows:
A table is created and filled (onlthing different will be the table name and the third "descriptive column" and the number of rows:
mysql> select * from pmdSmIDs;
+----+-----------+----+
| ID | elementID | SM |
+----+-----------+----+
| 1 | 1 | 1 |
| 2 | 2 | 2 |
| 3 | 3 | 3 |
| 4 | 4 | 4 |
| 5 | 5 | 5 |
| 6 | 6 | 6 |
| 7 | 7 | 7 |
| 8 | 8 | 8 |
| 9 | 9 | 9 |
| 10 | 10 | 10 |
| 11 | 11 | 11 |
| 12 | 12 | 12 |
| 13 | 13 | 13 |
| 14 | 14 | 14 |
| 15 | 15 | 15 |
| 16 | 16 | 16 |
| 17 | 17 | 17 |
| 18 | 18 | 18 |
| 19 | 19 | 19 |
| 20 | 20 | 20 |
| 21 | 21 | 21 |
| 22 | 22 | 22 |
| 23 | 23 | 23 |
| 24 | 24 | 24 |
+----+-----------+----+
24 rows in set (0.01 sec)
The the Nodes table is update to read as follows:
mysql> select * from Nodes where name = 'pmdSMCalib' \G
*************************** 1. row ***************************
name: pmdSMCalib
versionKey: default
nodeType: table
structName: pmdSMCalib
elementID: None
indexName: pmdSm
indexVal: 0
baseLine: N
isBinary: N
isIndexed: Y
ID: 6
entryTime: 2005-11-10 21:06:11
Comment:
1 row in set (0.00 sec)
+++++++++++++++++++++++++++++
note the index field reads pmdSm not the default none.