nulls from java api - Kdb+ / qStudio

Home Forums Kdb+ / qStudio nulls from java api

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #136

    Stephen Withers
    Guest

    Can you please tell me what values are used for null for the various datatypes when calling from c.java?

    #155

    A special NULL function can be used to create kdb “null” values in the java api:

    Kdb+ type Kdb+ null accessor Java null
    Boolean NULL(‘b’) Boolean(false)
    Byte NULL(‘x’) Byte(byte() 0)
    Short NULL(‘h’) Short(Short.MIN_VALUE)
    Integer NULL(‘i’) Integer(Integer.MIN_VALUE)
    Long NULL(‘j’) Long(Long.MIN_VALUE)
    Float NULL(‘e’) Float(Double.NaN)
    Double NULL(‘f’) Double(Double.Nan)
    Character NULL(‘c’) Character(‘ ‘)
    String NULL(‘s’) “”
    Month NULL(‘m’) Month(Integer.MIN_VALUE)
    Date NULL(‘d’) Date(Integer.MIN_VALUE)
    DataTime/java.util.Date NULL(‘z’) Timestamp(Long.MIN_VALUE)
    Minute NULL(‘u’) Minute(Integer.MIN_VALUE)
    Second NULL(‘v’) Second(Integer.MIN_VALUE)
    Time NULL(‘t’) Time(Integer.MIN_VALUE)

    Source: http://code.kx.com/wiki/Cookbook/InterfacingWithJava#Creating_null_values

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.