Package org.lwjgl.odbc
Class SQL_INTERVAL_STRUCT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.odbc.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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SQL_INTERVAL_STRUCT.Buffer
An array ofSQL_INTERVAL_STRUCT
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
INTERVAL_SIGN
INTERVAL_TYPE
INTVAL
INTVAL_DAY_SECOND
INTVAL_YEAR_MONTHThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description SQL_INTERVAL_STRUCT(java.nio.ByteBuffer container)
Creates aSQL_INTERVAL_STRUCT
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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
callocStack()
Returns a newSQL_INTERVAL_STRUCT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static SQL_INTERVAL_STRUCT.Buffer
callocStack(int capacity)
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static SQL_INTERVAL_STRUCT.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SQL_INTERVAL_STRUCT
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_INTERVAL_STRUCT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.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 SQL_INTERVAL_STRUCT
createSafe(long address)
static SQL_INTERVAL_STRUCT.Buffer
createSafe(long address, int capacity)
short
interval_sign()
Returns the value of theinterval_sign
field.SQL_INTERVAL_STRUCT
interval_sign(short value)
Sets the specified value to theinterval_sign
field.int
interval_type()
Returns the value of theinterval_type
field.SQL_INTERVAL_STRUCT
interval_type(int value)
Sets the specified value to theinterval_type
field.SQL_DAY_SECOND_STRUCT
intval_day_second()
Returns aSQL_DAY_SECOND_STRUCT
view of theintval.day_second
field.SQL_INTERVAL_STRUCT
intval_day_second(java.util.function.Consumer<SQL_DAY_SECOND_STRUCT> consumer)
Passes theintval.day_second
field to the specifiedConsumer
.SQL_INTERVAL_STRUCT
intval_day_second(SQL_DAY_SECOND_STRUCT value)
Copies the specifiedSQL_DAY_SECOND_STRUCT
to theintval.day_second
field.SQL_YEAR_MONTH_STRUCT
intval_year_month()
Returns aSQL_YEAR_MONTH_STRUCT
view of theintval.year_month
field.SQL_INTERVAL_STRUCT
intval_year_month(java.util.function.Consumer<SQL_YEAR_MONTH_STRUCT> consumer)
Passes theintval.year_month
field to the specifiedConsumer
.SQL_INTERVAL_STRUCT
intval_year_month(SQL_YEAR_MONTH_STRUCT value)
Copies the specifiedSQL_YEAR_MONTH_STRUCT
to theintval.year_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
mallocStack()
Returns a newSQL_INTERVAL_STRUCT
instance allocated on the thread-localMemoryStack
.static SQL_INTERVAL_STRUCT.Buffer
mallocStack(int capacity)
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
.static SQL_INTERVAL_STRUCT.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
.static SQL_INTERVAL_STRUCT
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_INTERVAL_STRUCT
instance allocated on the specifiedMemoryStack
.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
.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.SQL_INTERVAL_STRUCT
set(SQL_INTERVAL_STRUCT src)
Copies the specified struct data to this struct.int
sizeof()
-
-
-
Constructor Detail
-
SQL_INTERVAL_STRUCT
public SQL_INTERVAL_STRUCT(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
interval_type
public int interval_type()
Returns the value of theinterval_type
field.
-
interval_sign
public short interval_sign()
Returns the value of theinterval_sign
field.
-
intval_year_month
public SQL_YEAR_MONTH_STRUCT intval_year_month()
Returns aSQL_YEAR_MONTH_STRUCT
view of theintval.year_month
field.
-
intval_day_second
public SQL_DAY_SECOND_STRUCT intval_day_second()
Returns aSQL_DAY_SECOND_STRUCT
view of theintval.day_second
field.
-
interval_type
public SQL_INTERVAL_STRUCT interval_type(int value)
Sets the specified value to theinterval_type
field.
-
interval_sign
public SQL_INTERVAL_STRUCT interval_sign(short value)
Sets the specified value to theinterval_sign
field.
-
intval_year_month
public SQL_INTERVAL_STRUCT intval_year_month(SQL_YEAR_MONTH_STRUCT value)
Copies the specifiedSQL_YEAR_MONTH_STRUCT
to theintval.year_month
field.
-
intval_year_month
public SQL_INTERVAL_STRUCT intval_year_month(java.util.function.Consumer<SQL_YEAR_MONTH_STRUCT> consumer)
Passes theintval.year_month
field to the specifiedConsumer
.
-
intval_day_second
public SQL_INTERVAL_STRUCT intval_day_second(SQL_DAY_SECOND_STRUCT value)
Copies the specifiedSQL_DAY_SECOND_STRUCT
to theintval.day_second
field.
-
intval_day_second
public SQL_INTERVAL_STRUCT intval_day_second(java.util.function.Consumer<SQL_DAY_SECOND_STRUCT> consumer)
Passes theintval.day_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
public SQL_INTERVAL_STRUCT set(SQL_INTERVAL_STRUCT src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static SQL_INTERVAL_STRUCT malloc()
Returns a newSQL_INTERVAL_STRUCT
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static SQL_INTERVAL_STRUCT calloc()
Returns a newSQL_INTERVAL_STRUCT
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static SQL_INTERVAL_STRUCT create()
Returns a newSQL_INTERVAL_STRUCT
instance allocated withBufferUtils
.
-
create
public static SQL_INTERVAL_STRUCT create(long address)
Returns a newSQL_INTERVAL_STRUCT
instance for the specified memory address.
-
createSafe
@Nullable public static SQL_INTERVAL_STRUCT createSafe(long address)
-
malloc
public static SQL_INTERVAL_STRUCT.Buffer malloc(int capacity)
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static SQL_INTERVAL_STRUCT.Buffer calloc(int capacity)
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static SQL_INTERVAL_STRUCT.Buffer create(int capacity)
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static SQL_INTERVAL_STRUCT.Buffer create(long address, int capacity)
Create aSQL_INTERVAL_STRUCT.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static SQL_INTERVAL_STRUCT.Buffer createSafe(long address, int capacity)
-
mallocStack
public static SQL_INTERVAL_STRUCT mallocStack()
Returns a newSQL_INTERVAL_STRUCT
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static SQL_INTERVAL_STRUCT callocStack()
Returns a newSQL_INTERVAL_STRUCT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static SQL_INTERVAL_STRUCT mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_INTERVAL_STRUCT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static SQL_INTERVAL_STRUCT callocStack(org.lwjgl.system.MemoryStack stack)
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
-
mallocStack
public static SQL_INTERVAL_STRUCT.Buffer mallocStack(int capacity)
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static SQL_INTERVAL_STRUCT.Buffer callocStack(int capacity)
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static SQL_INTERVAL_STRUCT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static SQL_INTERVAL_STRUCT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_INTERVAL_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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
public static SQL_YEAR_MONTH_STRUCT nintval_year_month(long struct)
Unsafe version ofintval_year_month()
.
-
nintval_day_second
public static SQL_DAY_SECOND_STRUCT nintval_day_second(long struct)
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
public static void nintval_year_month(long struct, SQL_YEAR_MONTH_STRUCT value)
Unsafe version ofintval_year_month
.
-
nintval_day_second
public static void nintval_day_second(long struct, SQL_DAY_SECOND_STRUCT value)
Unsafe version ofintval_day_second
.
-
-