Package org.lwjgl.odbc
Class SQL_INTERVAL_STRUCT
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct SQL_INTERVAL_STRUCT {
SQLINTERVAL interval_type;
SQLSMALLINT interval_sign;
struct {
SQL_YEAR_MONTH_STRUCT year_month;
SQL_DAY_SECOND_STRUCT day_second;
} intval;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSQL_INTERVAL_STRUCT(ByteBuffer container) Creates aSQL_INTERVAL_STRUCTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic SQL_INTERVAL_STRUCTcalloc()Returns a newSQL_INTERVAL_STRUCTinstance allocated withmemCalloc.static SQL_INTERVAL_STRUCT.Buffercalloc(int capacity) Returns a newSQL_INTERVAL_STRUCT.Bufferinstance allocated withmemCalloc.static SQL_INTERVAL_STRUCT.Buffercalloc(int capacity, MemoryStack stack) Returns a newSQL_INTERVAL_STRUCT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SQL_INTERVAL_STRUCTcalloc(MemoryStack stack) Returns a newSQL_INTERVAL_STRUCTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SQL_INTERVAL_STRUCTcreate()Returns a newSQL_INTERVAL_STRUCTinstance allocated withBufferUtils.static SQL_INTERVAL_STRUCT.Buffercreate(int capacity) Returns a newSQL_INTERVAL_STRUCT.Bufferinstance allocated withBufferUtils.static SQL_INTERVAL_STRUCTcreate(long address) Returns a newSQL_INTERVAL_STRUCTinstance for the specified memory address.static SQL_INTERVAL_STRUCT.Buffercreate(long address, int capacity) Create aSQL_INTERVAL_STRUCT.Bufferinstance at the specified memory.static @Nullable SQL_INTERVAL_STRUCTcreateSafe(long address) static @Nullable SQL_INTERVAL_STRUCT.BuffercreateSafe(long address, int capacity) shortinterval_sign(short value) Sets the specified value to theinterval_signfield.intinterval_type(int value) Sets the specified value to theinterval_typefield.intval_day_second(Consumer<SQL_DAY_SECOND_STRUCT> consumer) Passes theday_secondfield to the specifiedConsumer.Copies the specifiedSQL_DAY_SECOND_STRUCTto theday_secondfield.intval_year_month(Consumer<SQL_YEAR_MONTH_STRUCT> consumer) Passes theyear_monthfield to the specifiedConsumer.Copies the specifiedSQL_YEAR_MONTH_STRUCTto theyear_monthfield.static SQL_INTERVAL_STRUCTmalloc()Returns a newSQL_INTERVAL_STRUCTinstance allocated withmemAlloc.static SQL_INTERVAL_STRUCT.Buffermalloc(int capacity) Returns a newSQL_INTERVAL_STRUCT.Bufferinstance allocated withmemAlloc.static SQL_INTERVAL_STRUCT.Buffermalloc(int capacity, MemoryStack stack) Returns a newSQL_INTERVAL_STRUCT.Bufferinstance allocated on the specifiedMemoryStack.static SQL_INTERVAL_STRUCTmalloc(MemoryStack stack) Returns a newSQL_INTERVAL_STRUCTinstance allocated on the specifiedMemoryStack.static shortninterval_sign(long struct) Unsafe version ofinterval_sign().static voidninterval_sign(long struct, short value) Unsafe version ofinterval_sign.static intninterval_type(long struct) Unsafe version ofinterval_type().static voidninterval_type(long struct, int value) Unsafe version ofinterval_type.static SQL_DAY_SECOND_STRUCTnintval_day_second(long struct) Unsafe version ofintval_day_second().static voidnintval_day_second(long struct, SQL_DAY_SECOND_STRUCT value) Unsafe version ofintval_day_second.static SQL_YEAR_MONTH_STRUCTnintval_year_month(long struct) Unsafe version ofintval_year_month().static voidnintval_year_month(long struct, SQL_YEAR_MONTH_STRUCT value) Unsafe version ofintval_year_month.set(int interval_type, short interval_sign, SQL_YEAR_MONTH_STRUCT intval_year_month, SQL_DAY_SECOND_STRUCT intval_day_second) Initializes this struct with the specified values.set(SQL_INTERVAL_STRUCT src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
INTERVAL_TYPE
public static final int INTERVAL_TYPEThe struct member offsets. -
INTERVAL_SIGN
public static final int INTERVAL_SIGNThe struct member offsets. -
INTVAL
public static final int INTVALThe struct member offsets. -
INTVAL_YEAR_MONTH
public static final int INTVAL_YEAR_MONTHThe struct member offsets. -
INTVAL_DAY_SECOND
public static final int INTVAL_DAY_SECONDThe struct member offsets.
-
-
Constructor Details
-
SQL_INTERVAL_STRUCT
Creates aSQL_INTERVAL_STRUCTinstance at the current position of the specifiedByteBuffercontainer. 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 Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<SQL_INTERVAL_STRUCT>
-
interval_type
public int interval_type()- Returns:
- the value of the
interval_typefield.
-
interval_sign
public short interval_sign()- Returns:
- the value of the
interval_signfield.
-
intval_year_month
- Returns:
- a
SQL_YEAR_MONTH_STRUCTview of theintval.year_monthfield.
-
intval_day_second
- Returns:
- a
SQL_DAY_SECOND_STRUCTview of theintval.day_secondfield.
-
interval_type
Sets the specified value to theinterval_typefield. -
interval_sign
Sets the specified value to theinterval_signfield. -
intval_year_month
Copies the specifiedSQL_YEAR_MONTH_STRUCTto theyear_monthfield. -
intval_year_month
Passes theyear_monthfield to the specifiedConsumer. -
intval_day_second
Copies the specifiedSQL_DAY_SECOND_STRUCTto theday_secondfield. -
intval_day_second
Passes theday_secondfield to the specifiedConsumer. -
set
public SQL_INTERVAL_STRUCT set(int interval_type, short interval_sign, SQL_YEAR_MONTH_STRUCT intval_year_month, SQL_DAY_SECOND_STRUCT intval_day_second) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newSQL_INTERVAL_STRUCTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSQL_INTERVAL_STRUCTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSQL_INTERVAL_STRUCTinstance allocated withBufferUtils. -
create
Returns a newSQL_INTERVAL_STRUCTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSQL_INTERVAL_STRUCT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSQL_INTERVAL_STRUCT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSQL_INTERVAL_STRUCT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSQL_INTERVAL_STRUCT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSQL_INTERVAL_STRUCTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSQL_INTERVAL_STRUCTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSQL_INTERVAL_STRUCT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSQL_INTERVAL_STRUCT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ninterval_type
public static int ninterval_type(long struct) Unsafe version ofinterval_type(). -
ninterval_sign
public static short ninterval_sign(long struct) Unsafe version ofinterval_sign(). -
nintval_year_month
Unsafe version ofintval_year_month(). -
nintval_day_second
Unsafe version ofintval_day_second(). -
ninterval_type
public static void ninterval_type(long struct, int value) Unsafe version ofinterval_type. -
ninterval_sign
public static void ninterval_sign(long struct, short value) Unsafe version ofinterval_sign. -
nintval_year_month
Unsafe version ofintval_year_month. -
nintval_day_second
Unsafe version ofintval_day_second.
-