Package org.lwjgl.odbc
Class SQL_NUMERIC_STRUCT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.odbc.SQL_NUMERIC_STRUCT
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class SQL_NUMERIC_STRUCT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct SQL_NUMERIC_STRUCT { SQLCHAR precision; SQLSCHAR scale; SQLCHAR sign; SQLCHAR val[SQL_MAX_NUMERIC_LEN]; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSQL_NUMERIC_STRUCT.BufferAn array ofSQL_NUMERIC_STRUCTstructs.
-
Constructor Summary
Constructors Constructor Description SQL_NUMERIC_STRUCT(java.nio.ByteBuffer container)Creates aSQL_NUMERIC_STRUCTinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SQL_NUMERIC_STRUCTcalloc()Returns a newSQL_NUMERIC_STRUCTinstance allocated withmemCalloc.static SQL_NUMERIC_STRUCT.Buffercalloc(int capacity)Returns a newSQL_NUMERIC_STRUCT.Bufferinstance allocated withmemCalloc.static SQL_NUMERIC_STRUCT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSQL_NUMERIC_STRUCT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SQL_NUMERIC_STRUCTcalloc(org.lwjgl.system.MemoryStack stack)Returns a newSQL_NUMERIC_STRUCTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static SQL_NUMERIC_STRUCTcallocStack()Deprecated.static SQL_NUMERIC_STRUCT.BuffercallocStack(int capacity)Deprecated.static SQL_NUMERIC_STRUCT.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static SQL_NUMERIC_STRUCTcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static SQL_NUMERIC_STRUCTcreate()Returns a newSQL_NUMERIC_STRUCTinstance allocated withBufferUtils.static SQL_NUMERIC_STRUCT.Buffercreate(int capacity)Returns a newSQL_NUMERIC_STRUCT.Bufferinstance allocated withBufferUtils.static SQL_NUMERIC_STRUCTcreate(long address)Returns a newSQL_NUMERIC_STRUCTinstance for the specified memory address.static SQL_NUMERIC_STRUCT.Buffercreate(long address, int capacity)Create aSQL_NUMERIC_STRUCT.Bufferinstance at the specified memory.static SQL_NUMERIC_STRUCTcreateSafe(long address)static SQL_NUMERIC_STRUCT.BuffercreateSafe(long address, int capacity)static SQL_NUMERIC_STRUCTmalloc()Returns a newSQL_NUMERIC_STRUCTinstance allocated withmemAlloc.static SQL_NUMERIC_STRUCT.Buffermalloc(int capacity)Returns a newSQL_NUMERIC_STRUCT.Bufferinstance allocated withmemAlloc.static SQL_NUMERIC_STRUCT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSQL_NUMERIC_STRUCT.Bufferinstance allocated on the specifiedMemoryStack.static SQL_NUMERIC_STRUCTmalloc(org.lwjgl.system.MemoryStack stack)Returns a newSQL_NUMERIC_STRUCTinstance allocated on the specifiedMemoryStack.static SQL_NUMERIC_STRUCTmallocStack()Deprecated.static SQL_NUMERIC_STRUCT.BuffermallocStack(int capacity)Deprecated.static SQL_NUMERIC_STRUCT.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static SQL_NUMERIC_STRUCTmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static bytenprecision(long struct)Unsafe version ofprecision().static voidnprecision(long struct, byte value)Unsafe version ofprecision.static bytenscale(long struct)Unsafe version ofscale().static voidnscale(long struct, byte value)Unsafe version ofscale.static bytensign(long struct)Unsafe version ofsign().static voidnsign(long struct, byte value)Unsafe version ofsign.static java.nio.ByteBuffernval(long struct)Unsafe version ofval().static bytenval(long struct, int index)Unsafe version ofval.static voidnval(long struct, int index, byte value)Unsafe version ofval.static voidnval(long struct, java.nio.ByteBuffer value)Unsafe version ofval.byteprecision()SQL_NUMERIC_STRUCTprecision(byte value)Sets the specified value to theprecisionfield.bytescale()SQL_NUMERIC_STRUCTscale(byte value)Sets the specified value to thescalefield.SQL_NUMERIC_STRUCTset(byte precision, byte scale, byte sign, java.nio.ByteBuffer val)Initializes this struct with the specified values.SQL_NUMERIC_STRUCTset(SQL_NUMERIC_STRUCT src)Copies the specified struct data to this struct.bytesign()SQL_NUMERIC_STRUCTsign(byte value)Sets the specified value to thesignfield.intsizeof()java.nio.ByteBufferval()byteval(int index)SQL_NUMERIC_STRUCTval(int index, byte value)Sets the specified value at the specified index of thevalfield.SQL_NUMERIC_STRUCTval(java.nio.ByteBuffer value)Copies the specifiedByteBufferto thevalfield.
-
-
-
Constructor Detail
-
SQL_NUMERIC_STRUCT
public SQL_NUMERIC_STRUCT(java.nio.ByteBuffer container)
Creates aSQL_NUMERIC_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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
precision
public byte precision()
- Returns:
- the value of the
precisionfield.
-
scale
public byte scale()
- Returns:
- the value of the
scalefield.
-
sign
public byte sign()
- Returns:
- the value of the
signfield.
-
val
public java.nio.ByteBuffer val()
- Returns:
- a
ByteBufferview of thevalfield.
-
val
public byte val(int index)
- Returns:
- the value at the specified index of the
valfield.
-
precision
public SQL_NUMERIC_STRUCT precision(byte value)
Sets the specified value to theprecisionfield.
-
scale
public SQL_NUMERIC_STRUCT scale(byte value)
Sets the specified value to thescalefield.
-
sign
public SQL_NUMERIC_STRUCT sign(byte value)
Sets the specified value to thesignfield.
-
val
public SQL_NUMERIC_STRUCT val(java.nio.ByteBuffer value)
Copies the specifiedByteBufferto thevalfield.
-
val
public SQL_NUMERIC_STRUCT val(int index, byte value)
Sets the specified value at the specified index of thevalfield.
-
set
public SQL_NUMERIC_STRUCT set(byte precision, byte scale, byte sign, java.nio.ByteBuffer val)
Initializes this struct with the specified values.
-
set
public SQL_NUMERIC_STRUCT set(SQL_NUMERIC_STRUCT src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static SQL_NUMERIC_STRUCT malloc()
Returns a newSQL_NUMERIC_STRUCTinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static SQL_NUMERIC_STRUCT calloc()
Returns a newSQL_NUMERIC_STRUCTinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static SQL_NUMERIC_STRUCT create()
Returns a newSQL_NUMERIC_STRUCTinstance allocated withBufferUtils.
-
create
public static SQL_NUMERIC_STRUCT create(long address)
Returns a newSQL_NUMERIC_STRUCTinstance for the specified memory address.
-
createSafe
@Nullable public static SQL_NUMERIC_STRUCT createSafe(long address)
-
malloc
public static SQL_NUMERIC_STRUCT.Buffer malloc(int capacity)
Returns a newSQL_NUMERIC_STRUCT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static SQL_NUMERIC_STRUCT.Buffer calloc(int capacity)
Returns a newSQL_NUMERIC_STRUCT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static SQL_NUMERIC_STRUCT.Buffer create(int capacity)
Returns a newSQL_NUMERIC_STRUCT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static SQL_NUMERIC_STRUCT.Buffer create(long address, int capacity)
Create aSQL_NUMERIC_STRUCT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static SQL_NUMERIC_STRUCT.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static SQL_NUMERIC_STRUCT mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static SQL_NUMERIC_STRUCT callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static SQL_NUMERIC_STRUCT mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static SQL_NUMERIC_STRUCT callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static SQL_NUMERIC_STRUCT.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static SQL_NUMERIC_STRUCT.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static SQL_NUMERIC_STRUCT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static SQL_NUMERIC_STRUCT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static SQL_NUMERIC_STRUCT malloc(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_NUMERIC_STRUCTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static SQL_NUMERIC_STRUCT calloc(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_NUMERIC_STRUCTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static SQL_NUMERIC_STRUCT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_NUMERIC_STRUCT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static SQL_NUMERIC_STRUCT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_NUMERIC_STRUCT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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
public static java.nio.ByteBuffer nval(long struct)
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
public static void nval(long struct, java.nio.ByteBuffer value)Unsafe version ofval.
-
nval
public static void nval(long struct, int index, byte value)Unsafe version ofval.
-
-