-
Notifications
You must be signed in to change notification settings - Fork 4
KdbDict
Jas edited this page Mar 9, 2017
·
1 revision
This object is a replacement for c.Dict
. The main features provided by this are are:
-
Conversion to and from
c.Dict
-
new KdbDict(Dict)
to create a new object from a kdb Dict -
KdbDict.convertToDict
for conversion to a Dict ready for serialisation byc.java
-
-
Null detection with
add(Object, Object, Class)
- Java null cannot be serialised by
c.java
. This add function provides a way of specific which type you are expecting to add. Then at runtime, if the dictionary value is null, the appropriate kdb null is used instead.
- Java null cannot be serialised by
-
Standard Java collection methods
-
get
,add
,isEmpty
,has
are provided to make it easier to interact with the dictionary data
-
-
Value get with cast
-
getAs
retrieves the requested value with casting to the expected to type, to make your code easier to read
-
public Dict buildPlayerDictQuery() {
return new KdbDict()
.add("sym", null, Long.class)
.add("gameId", 4544332, Long.class)
.add("playerId", 1234, Long.class)
.convertToDict();
}
Copyright (C) Sport Trades Ltd 2017 - 2020, John Keys and Jaskirat Rajasansir 2020 - 2021