Class SQL_INTERVAL_STRUCT

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class SQL_INTERVAL_STRUCT
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource

    Layout

    
     struct SQL_INTERVAL_STRUCT {
         SQLINTERVAL interval_type;
         SQLSMALLINT interval_sign;
         struct {
             SQL_YEAR_MONTH_STRUCT year_month;
             SQL_DAY_SECOND_STRUCT day_second;
         } intval;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • INTERVAL_TYPE, INTERVAL_SIGN, INTVAL, INTVAL_YEAR_MONTH, INTVAL_DAY_SECOND

        The struct member offsets.
    • Constructor Detail

      • SQL_INTERVAL_STRUCT

        public SQL_INTERVAL_STRUCT​(java.nio.ByteBuffer container)
        Creates a SQL_INTERVAL_STRUCT instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • interval_type

        public int interval_type()
        Returns the value of the interval_type field.
      • interval_sign

        public short interval_sign()
        Returns the value of the interval_sign field.
      • interval_type

        public SQL_INTERVAL_STRUCT interval_type​(int value)
        Sets the specified value to the interval_type field.
      • interval_sign

        public SQL_INTERVAL_STRUCT interval_sign​(short value)
        Sets the specified value to the interval_sign field.
      • malloc

        public static SQL_INTERVAL_STRUCT malloc()
        Returns a new SQL_INTERVAL_STRUCT instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static SQL_INTERVAL_STRUCT calloc()
        Returns a new SQL_INTERVAL_STRUCT instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static SQL_INTERVAL_STRUCT create()
        Returns a new SQL_INTERVAL_STRUCT instance allocated with BufferUtils.
      • create

        public static SQL_INTERVAL_STRUCT create​(long address)
        Returns a new SQL_INTERVAL_STRUCT instance for the specified memory address.
      • createSafe

        @Nullable
        public static SQL_INTERVAL_STRUCT createSafe​(long address)
        Like create, but returns null if address is NULL.
      • mallocStack

        public static SQL_INTERVAL_STRUCT mallocStack()
        Returns a new SQL_INTERVAL_STRUCT instance allocated on the thread-local MemoryStack.
      • callocStack

        public static SQL_INTERVAL_STRUCT callocStack()
        Returns a new SQL_INTERVAL_STRUCT instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static SQL_INTERVAL_STRUCT mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new SQL_INTERVAL_STRUCT instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static SQL_INTERVAL_STRUCT callocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new SQL_INTERVAL_STRUCT instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • mallocStack

        public static SQL_INTERVAL_STRUCT.Buffer mallocStack​(int capacity,
                                                             org.lwjgl.system.MemoryStack stack)
        Returns a new SQL_INTERVAL_STRUCT.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static SQL_INTERVAL_STRUCT.Buffer callocStack​(int capacity,
                                                             org.lwjgl.system.MemoryStack stack)
        Returns a new SQL_INTERVAL_STRUCT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • ninterval_type

        public static int ninterval_type​(long struct)
        Unsafe version of interval_type().
      • ninterval_sign

        public static short ninterval_sign​(long struct)
        Unsafe version of interval_sign().
      • ninterval_type

        public static void ninterval_type​(long struct,
                                          int value)
        Unsafe version of interval_type.
      • ninterval_sign

        public static void ninterval_sign​(long struct,
                                          short value)
        Unsafe version of interval_sign.