You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Changes
2
2
3
+
## v1.1.4
4
+
* Jan/07/2023
5
+
* Added a new function get_tuple_schema_and_attribute_info to fetch the tuple schema literal string along with the tuple attribute information map with fully qualified tuple attribute names and their SPL type names as key/value pairs in that map.
6
+
3
7
## v1.1.3
4
8
* Oct/16/2021
5
9
* Enhanced the compare_tuple_attributes function to give back two lists i.e. one with the attribute names that have matching values and another with the attribute names that have differing values.
Copy file name to clipboardExpand all lines: README.md
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -184,6 +184,39 @@ if(error == 0) {
184
184
// It is a void function that returns nothing.
185
185
```
186
186
187
+
**get_tuple_schema_and_attribute_info** is another C++ native function provided via this toolkit. This function fetches the tuple schema literal string along with the tuple attribute information as a map with fully qualified tuple attribute names and their SPL type names as key/value pairs in that map.
188
+
189
+
```
190
+
// This namespace usage declaration is needed at the top of an application.
printStringLn("Get tuple schema function returned successfully. " +
201
+
", tupleSchema = " + tupleSchema +
202
+
", attributeInfo = " + (rstring)attributeInfo);
203
+
} else {
204
+
printStringLn("Get tuple schema function returned an error. Error=" + (rstring)error);
205
+
}
206
+
207
+
// Following is the usage description for the get_tuple_schema_and_attribute_info function.
208
+
// Arg1: Your tuple
209
+
// Arg2: A mutable variable of rstring type in which the
210
+
// tuple schema literal string will be returned.
211
+
// Arg3: A mutable variable of map<string, rstring> type in which the
212
+
// tuple attribute information will be returned. Map keys will
213
+
// carry the fully qualified tuple attribute names and the
214
+
// map values will carry the SPL type name of the attributes.
215
+
// Arg4: A mutable int32 variable to receive non-zero error code if any.
216
+
// Arg5: A boolean value to enable debug tracing inside this function.
217
+
// It is a void function that returns nothing.
218
+
```
219
+
187
220
## Design considerations
188
221
This toolkit came into existence for a specific need with which a large enterprise customer approached the author of this toolkit. There is already a built-in function named *evalPredicate* that is available in the official IBM Streams product. However, that function has certain limitations. To fill that gap, this toolkit with its own **eval_predicate** function is being made available freely via the publicly accessible IBMStreams GitHub. The **eval_predicate** function from this toolkit differs from the *evalPredicate* built-in function in the IBM Streams product in the following ways.
It fetches the schema literal string of a given tuple along with the information about all of its attributes.
49
+
@param myTuple A user defined tuple for which schema and attribute information will be obtained. Type: Tuple
50
+
@param schema A mutable variable in which the complete schema literal string of a given tuple will be returned. Type: rstring
51
+
@param attributeInfo A mutable map variable in which information about the tuple attributes will be returned. Map key will carry the fully qualified name of a given tuple attribute and map value will carry the SPL type name of that attribute. Type: map<rstring, rstring>
52
+
@param error A mutable variable that will contain a non-zero error code if an error occurs. Type: int32
53
+
@param trace A boolean value to enable tracing inside this function. Type: boolean
0 commit comments