The federated server creates an instance of the runtime data class to represent each buffer the system uses to transfer column values between the server and a wrapper. The federated server creates a buffer for each query parameter for which it transfers a value to the wrapper during execution. The federated server also creates a buffer for each column of the result row returned by the wrapper (for example, for each head expression in the query fragment).
The federated server supplies the column number, data description and data buffer. If the runtime data object is being used to pass a parameter from the federated server to a wrapper, the data length and buffer contents will be supplied by the federated server. The value in the buffer will have the SQL type specified by the attached description. The wrapper must convert the value to whatever type the data source expects. If the runtime data object is being used to return results from the wrapper to the federated server, the wrapper supplies the data length and buffer contents. The maximum (allocated) length of the buffer and the expected data type can be obtained from the attached description. The wrapper must convert the value obtained from the data source to the SQL type specified by the description.
| Public member function in C++ | Public member function in Java | Behavior |
|---|---|---|
| check_friendly_div_by_0 | checkFriendlyDivBy0 | Division by zero? |
| check_friendly_exception | checkFriendlyException | Arithmetic exception? |
| get_actual_length | getActualLength | Get length of data in buffer |
| get_data | getData | Get pointer to data buffer |
| get_data_index | getDataIndex | Get column number |
| get_invariant | getInvariant | Is input value invariant? |
| is_data_null | isDataNull | Semantic or “friendly arithmetic” null? |
| is_semantic_null | isSemanticNull | Semantic null? |
| set_actual_length | setActualLength | Set length of data in buffer |
| set_data | setXX | Copy data to buffer |
| set_data_null | setDataNull | Set null indicator |
| set_friendly_div_by_0 | setFriendlyDivBy0 | Indicate zero-divide exception, set null first! |
| set_friendly_exception | setFriendlyException | Indicate arithmetic exception, set null first! |