Package org.lwjgl.odbc
Class SQL_NUMERIC_STRUCT
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct SQL_NUMERIC_STRUCT {
SQLCHAR precision;
SQLSCHAR scale;
SQLCHAR sign;
SQLCHAR val[SQL_MAX_NUMERIC_LEN];
}
-
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 size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionSQL_NUMERIC_STRUCT
(ByteBuffer container) Creates aSQL_NUMERIC_STRUCT
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic SQL_NUMERIC_STRUCT
calloc()
Returns a newSQL_NUMERIC_STRUCT
instance allocated withmemCalloc
.static SQL_NUMERIC_STRUCT.Buffer
calloc
(int capacity) Returns a newSQL_NUMERIC_STRUCT.Buffer
instance allocated withmemCalloc
.static SQL_NUMERIC_STRUCT.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSQL_NUMERIC_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SQL_NUMERIC_STRUCT
calloc
(MemoryStack stack) Returns a newSQL_NUMERIC_STRUCT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SQL_NUMERIC_STRUCT
Deprecated.static SQL_NUMERIC_STRUCT.Buffer
callocStack
(int capacity) Deprecated.static SQL_NUMERIC_STRUCT.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static SQL_NUMERIC_STRUCT
callocStack
(MemoryStack stack) Deprecated.static SQL_NUMERIC_STRUCT
create()
Returns a newSQL_NUMERIC_STRUCT
instance allocated withBufferUtils
.static SQL_NUMERIC_STRUCT.Buffer
create
(int capacity) Returns a newSQL_NUMERIC_STRUCT.Buffer
instance allocated withBufferUtils
.static SQL_NUMERIC_STRUCT
create
(long address) Returns a newSQL_NUMERIC_STRUCT
instance for the specified memory address.static SQL_NUMERIC_STRUCT.Buffer
create
(long address, int capacity) Create aSQL_NUMERIC_STRUCT.Buffer
instance at the specified memory.static @Nullable SQL_NUMERIC_STRUCT
createSafe
(long address) static @Nullable SQL_NUMERIC_STRUCT.Buffer
createSafe
(long address, int capacity) static SQL_NUMERIC_STRUCT
malloc()
Returns a newSQL_NUMERIC_STRUCT
instance allocated withmemAlloc
.static SQL_NUMERIC_STRUCT.Buffer
malloc
(int capacity) Returns a newSQL_NUMERIC_STRUCT.Buffer
instance allocated withmemAlloc
.static SQL_NUMERIC_STRUCT.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSQL_NUMERIC_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
.static SQL_NUMERIC_STRUCT
malloc
(MemoryStack stack) Returns a newSQL_NUMERIC_STRUCT
instance allocated on the specifiedMemoryStack
.static SQL_NUMERIC_STRUCT
Deprecated.static SQL_NUMERIC_STRUCT.Buffer
mallocStack
(int capacity) Deprecated.static SQL_NUMERIC_STRUCT.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static SQL_NUMERIC_STRUCT
mallocStack
(MemoryStack stack) Deprecated.static byte
nprecision
(long struct) Unsafe version ofprecision()
.static void
nprecision
(long struct, byte value) Unsafe version ofprecision
.static byte
nscale
(long struct) Unsafe version ofscale()
.static void
nscale
(long struct, byte value) Unsafe version ofscale
.static byte
nsign
(long struct) Unsafe version ofsign()
.static void
nsign
(long struct, byte value) Unsafe version ofsign
.static ByteBuffer
nval
(long struct) Unsafe version ofval()
.static byte
nval
(long struct, int index) Unsafe version ofval
.static void
nval
(long struct, int index, byte value) Unsafe version ofval
.static void
nval
(long struct, ByteBuffer value) Unsafe version ofval
.byte
precision
(byte value) Sets the specified value to theprecision
field.byte
scale()
scale
(byte value) Sets the specified value to thescale
field.set
(byte precision, byte scale, byte sign, ByteBuffer val) Initializes this struct with the specified values.set
(SQL_NUMERIC_STRUCT src) Copies the specified struct data to this struct.byte
sign()
sign
(byte value) Sets the specified value to thesign
field.int
sizeof()
Returnssizeof(struct)
.val()
byte
val
(int index) val
(int index, byte value) Sets the specified value at the specified index of theval
field.val
(ByteBuffer value) Copies the specifiedByteBuffer
to theval
field.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. -
PRECISION
public static final int PRECISIONThe struct member offsets. -
SCALE
public static final int SCALEThe struct member offsets. -
SIGN
public static final int SIGNThe struct member offsets. -
VAL
public static final int VALThe struct member offsets.
-
-
Constructor Details
-
SQL_NUMERIC_STRUCT
Creates aSQL_NUMERIC_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_NUMERIC_STRUCT>
-
precision
public byte precision()- Returns:
- the value of the
precision
field.
-
scale
public byte scale()- Returns:
- the value of the
scale
field.
-
sign
public byte sign()- Returns:
- the value of the
sign
field.
-
val
- Returns:
- a
ByteBuffer
view of theval
field.
-
val
public byte val(int index) - Returns:
- the value at the specified index of the
val
field.
-
precision
Sets the specified value to theprecision
field. -
scale
Sets the specified value to thescale
field. -
sign
Sets the specified value to thesign
field. -
val
Copies the specifiedByteBuffer
to theval
field. -
val
Sets the specified value at the specified index of theval
field. -
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_NUMERIC_STRUCT
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSQL_NUMERIC_STRUCT
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSQL_NUMERIC_STRUCT
instance allocated withBufferUtils
. -
create
Returns a newSQL_NUMERIC_STRUCT
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSQL_NUMERIC_STRUCT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSQL_NUMERIC_STRUCT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSQL_NUMERIC_STRUCT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSQL_NUMERIC_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_NUMERIC_STRUCT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSQL_NUMERIC_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_NUMERIC_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSQL_NUMERIC_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
-
nprecision
public static byte nprecision(long struct) Unsafe version ofprecision()
. -
nscale
public static byte nscale(long struct) Unsafe version ofscale()
. -
nsign
public static byte nsign(long struct) Unsafe version ofsign()
. -
nval
Unsafe version ofval()
. -
nval
public static byte nval(long struct, int index) Unsafe version ofval
. -
nprecision
public static void nprecision(long struct, byte value) Unsafe version ofprecision
. -
nscale
public static void nscale(long struct, byte value) Unsafe version ofscale
. -
nsign
public static void nsign(long struct, byte value) Unsafe version ofsign
. -
nval
Unsafe version ofval
. -
nval
public static void nval(long struct, int index, byte value) Unsafe version ofval
.
-