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 {
{@link SQL_YEAR_MONTH_STRUCT SQL_YEAR_MONTH_STRUCT} year_month;
{@link SQL_DAY_SECOND_STRUCT SQL_DAY_SECOND_STRUCT} day_second;
} intval;
}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The 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_STRUCT
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic SQL_INTERVAL_STRUCT
calloc()
Returns a newSQL_INTERVAL_STRUCT
instance allocated withmemCalloc
.static SQL_INTERVAL_STRUCT.Buffer
calloc
(int capacity) Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated withmemCalloc
.static SQL_INTERVAL_STRUCT.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SQL_INTERVAL_STRUCT
calloc
(MemoryStack stack) Returns a newSQL_INTERVAL_STRUCT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SQL_INTERVAL_STRUCT
Deprecated.static SQL_INTERVAL_STRUCT.Buffer
callocStack
(int capacity) Deprecated.static SQL_INTERVAL_STRUCT.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static SQL_INTERVAL_STRUCT
callocStack
(MemoryStack stack) Deprecated.static SQL_INTERVAL_STRUCT
create()
Returns a newSQL_INTERVAL_STRUCT
instance allocated withBufferUtils
.static SQL_INTERVAL_STRUCT.Buffer
create
(int capacity) Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated withBufferUtils
.static SQL_INTERVAL_STRUCT
create
(long address) Returns a newSQL_INTERVAL_STRUCT
instance for the specified memory address.static SQL_INTERVAL_STRUCT.Buffer
create
(long address, int capacity) Create aSQL_INTERVAL_STRUCT.Buffer
instance at the specified memory.static @Nullable SQL_INTERVAL_STRUCT
createSafe
(long address) static @Nullable SQL_INTERVAL_STRUCT.Buffer
createSafe
(long address, int capacity) short
interval_sign
(short value) Sets the specified value to theinterval_sign
field.int
interval_type
(int value) Sets the specified value to theinterval_type
field.intval_day_second
(Consumer<SQL_DAY_SECOND_STRUCT> consumer) Passes theday_second
field to the specifiedConsumer
.Copies the specifiedSQL_DAY_SECOND_STRUCT
to theday_second
field.intval_year_month
(Consumer<SQL_YEAR_MONTH_STRUCT> consumer) Passes theyear_month
field to the specifiedConsumer
.Copies the specifiedSQL_YEAR_MONTH_STRUCT
to theyear_month
field.static SQL_INTERVAL_STRUCT
malloc()
Returns a newSQL_INTERVAL_STRUCT
instance allocated withmemAlloc
.static SQL_INTERVAL_STRUCT.Buffer
malloc
(int capacity) Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated withmemAlloc
.static SQL_INTERVAL_STRUCT.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
.static SQL_INTERVAL_STRUCT
malloc
(MemoryStack stack) Returns a newSQL_INTERVAL_STRUCT
instance allocated on the specifiedMemoryStack
.static SQL_INTERVAL_STRUCT
Deprecated.static SQL_INTERVAL_STRUCT.Buffer
mallocStack
(int capacity) Deprecated.static SQL_INTERVAL_STRUCT.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static SQL_INTERVAL_STRUCT
mallocStack
(MemoryStack stack) Deprecated.static short
ninterval_sign
(long struct) Unsafe version ofinterval_sign()
.static void
ninterval_sign
(long struct, short value) Unsafe version ofinterval_sign
.static int
ninterval_type
(long struct) Unsafe version ofinterval_type()
.static void
ninterval_type
(long struct, int value) Unsafe version ofinterval_type
.static SQL_DAY_SECOND_STRUCT
nintval_day_second
(long struct) Unsafe version ofintval_day_second()
.static void
nintval_day_second
(long struct, SQL_DAY_SECOND_STRUCT value) Unsafe version ofintval_day_second
.static SQL_YEAR_MONTH_STRUCT
nintval_year_month
(long struct) Unsafe version ofintval_year_month()
.static void
nintval_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.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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_STRUCT
instance at the current position of the specifiedByteBuffer
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<SQL_INTERVAL_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.
-
intval_year_month
- Returns:
- a
SQL_YEAR_MONTH_STRUCT
view of theintval.year_month
field.
-
intval_day_second
- Returns:
- a
SQL_DAY_SECOND_STRUCT
view of theintval.day_second
field.
-
interval_type
Sets the specified value to theinterval_type
field. -
interval_sign
Sets the specified value to theinterval_sign
field. -
intval_year_month
Copies the specifiedSQL_YEAR_MONTH_STRUCT
to theyear_month
field. -
intval_year_month
Passes theyear_month
field to the specifiedConsumer
. -
intval_day_second
Copies the specifiedSQL_DAY_SECOND_STRUCT
to theday_second
field. -
intval_day_second
Passes theday_second
field 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_STRUCT
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSQL_INTERVAL_STRUCT
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSQL_INTERVAL_STRUCT
instance allocated withBufferUtils
. -
create
Returns a newSQL_INTERVAL_STRUCT
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSQL_INTERVAL_STRUCT.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newSQL_INTERVAL_STRUCT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSQL_INTERVAL_STRUCT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-