Package org.lwjgl.odbc
Class SQL_DATE_STRUCT
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct SQL_DATE_STRUCT {
SQLSMALLINT year;
SQLUSMALLINT month;
SQLUSMALLINT day;
}-
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 size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionSQL_DATE_STRUCT(ByteBuffer container) Creates aSQL_DATE_STRUCTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic SQL_DATE_STRUCTcalloc()Returns a newSQL_DATE_STRUCTinstance allocated withmemCalloc.static SQL_DATE_STRUCT.Buffercalloc(int capacity) Returns a newSQL_DATE_STRUCT.Bufferinstance allocated withmemCalloc.static SQL_DATE_STRUCT.Buffercalloc(int capacity, MemoryStack stack) Returns a newSQL_DATE_STRUCT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SQL_DATE_STRUCTcalloc(MemoryStack stack) Returns a newSQL_DATE_STRUCTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SQL_DATE_STRUCTDeprecated.static SQL_DATE_STRUCT.BuffercallocStack(int capacity) Deprecated.static SQL_DATE_STRUCT.BuffercallocStack(int capacity, MemoryStack stack) Deprecated.static SQL_DATE_STRUCTcallocStack(MemoryStack stack) Deprecated.static SQL_DATE_STRUCTcreate()Returns a newSQL_DATE_STRUCTinstance allocated withBufferUtils.static SQL_DATE_STRUCT.Buffercreate(int capacity) Returns a newSQL_DATE_STRUCT.Bufferinstance allocated withBufferUtils.static SQL_DATE_STRUCTcreate(long address) Returns a newSQL_DATE_STRUCTinstance for the specified memory address.static SQL_DATE_STRUCT.Buffercreate(long address, int capacity) Create aSQL_DATE_STRUCT.Bufferinstance at the specified memory.static @Nullable SQL_DATE_STRUCTcreateSafe(long address) static @Nullable SQL_DATE_STRUCT.BuffercreateSafe(long address, int capacity) shortday()day(short value) Sets the specified value to thedayfield.static SQL_DATE_STRUCTmalloc()Returns a newSQL_DATE_STRUCTinstance allocated withmemAlloc.static SQL_DATE_STRUCT.Buffermalloc(int capacity) Returns a newSQL_DATE_STRUCT.Bufferinstance allocated withmemAlloc.static SQL_DATE_STRUCT.Buffermalloc(int capacity, MemoryStack stack) Returns a newSQL_DATE_STRUCT.Bufferinstance allocated on the specifiedMemoryStack.static SQL_DATE_STRUCTmalloc(MemoryStack stack) Returns a newSQL_DATE_STRUCTinstance allocated on the specifiedMemoryStack.static SQL_DATE_STRUCTDeprecated.static SQL_DATE_STRUCT.BuffermallocStack(int capacity) Deprecated.static SQL_DATE_STRUCT.BuffermallocStack(int capacity, MemoryStack stack) Deprecated.static SQL_DATE_STRUCTmallocStack(MemoryStack stack) Deprecated.shortmonth()month(short value) Sets the specified value to themonthfield.static shortnday(long struct) Unsafe version ofday().static voidnday(long struct, short value) Unsafe version ofday.static shortnmonth(long struct) Unsafe version ofmonth().static voidnmonth(long struct, short value) Unsafe version ofmonth.static shortnyear(long struct) Unsafe version ofyear().static voidnyear(long struct, short value) Unsafe version ofyear.set(short year, short month, short day) Initializes this struct with the specified values.set(SQL_DATE_STRUCT src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).shortyear()year(short value) Sets the specified value to theyearfield.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. -
YEAR
public static final int YEARThe struct member offsets. -
MONTH
public static final int MONTHThe struct member offsets. -
DAY
public static final int DAYThe struct member offsets.
-
-
Constructor Details
-
SQL_DATE_STRUCT
Creates aSQL_DATE_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_DATE_STRUCT>
-
year
public short year()- Returns:
- the value of the
yearfield.
-
month
public short month()- Returns:
- the value of the
monthfield.
-
day
public short day()- Returns:
- the value of the
dayfield.
-
year
Sets the specified value to theyearfield. -
month
Sets the specified value to themonthfield. -
day
Sets the specified value to thedayfield. -
set
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_DATE_STRUCTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSQL_DATE_STRUCTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSQL_DATE_STRUCTinstance allocated withBufferUtils. -
create
Returns a newSQL_DATE_STRUCTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSQL_DATE_STRUCT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSQL_DATE_STRUCT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSQL_DATE_STRUCT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSQL_DATE_STRUCT.Bufferinstance 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_DATE_STRUCTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSQL_DATE_STRUCTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSQL_DATE_STRUCT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSQL_DATE_STRUCT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nyear
public static short nyear(long struct) Unsafe version ofyear(). -
nmonth
public static short nmonth(long struct) Unsafe version ofmonth(). -
nday
public static short nday(long struct) Unsafe version ofday(). -
nyear
public static void nyear(long struct, short value) Unsafe version ofyear. -
nmonth
public static void nmonth(long struct, short value) Unsafe version ofmonth. -
nday
public static void nday(long struct, short value) Unsafe version ofday.
-