Package com.kuzudb
Class Value
java.lang.Object
com.kuzudb.Value
Value can hold data of different types.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Check if the Value has been destroyed.clone()
Clone the Value.void
Copy the Value from another Value.static Value
createDefault
(DataType data_type) Create a default Value with the given data type.static Value
Create a null Value.static Value
createNullWithDataType
(DataType data_type) Create a null Value with the given data type.void
destroy()
Destroy the Value.protected void
finalize()
Finalize.Get the data type of the Value.<T> T
getValue()
Get the actual value from the Value.boolean
isNull()
Check if the Value is null.boolean
void
setNull
(boolean flag) Set the Value to null.toString()
Convert the Value to string.
-
Field Details
-
v_ref
public long v_ref
-
-
Constructor Details
-
Value
Construct a Value from a val.- Throws:
ObjectRefDestroyedException
- If the Value has been destroyed.
-
-
Method Details
-
createNull
Create a null Value.- Returns:
- The null Value.
-
createNullWithDataType
Create a null Value with the given data type.- Parameters:
data_type
- : The data type of the null Value.
-
createDefault
Create a default Value with the given data type.- Parameters:
data_type
- : The data type of the default Value.- Returns:
- The default Value.
-
checkNotDestroyed
Check if the Value has been destroyed.- Throws:
ObjectRefDestroyedException
- If the Value has been destroyed.
-
finalize
Finalize.- Overrides:
finalize
in classObject
- Throws:
ObjectRefDestroyedException
- If the Value has been destroyed.
-
isOwnedByCPP
public boolean isOwnedByCPP() -
destroy
Destroy the Value.- Throws:
ObjectRefDestroyedException
- If the Value has been destroyed.
-
isNull
Check if the Value is null.- Returns:
- True if the Value is null, false otherwise.
- Throws:
ObjectRefDestroyedException
- If the Value has been destroyed.
-
setNull
Set the Value to null.- Parameters:
flag
- : True if the Value is set to null, false otherwise.- Throws:
ObjectRefDestroyedException
- If the Value has been destroyed.
-
copy
Copy the Value from another Value.- Parameters:
other
- : The Value to copy from.- Throws:
ObjectRefDestroyedException
- If the Value has been destroyed.
-
clone
Clone the Value. -
getValue
Get the actual value from the Value.- Returns:
- The value of the given type.
- Throws:
ObjectRefDestroyedException
- If the Value has been destroyed.
-
getDataType
Get the data type of the Value.- Returns:
- The data type of the Value.
- Throws:
ObjectRefDestroyedException
- If the Value has been destroyed.
-
toString
Convert the Value to string.
-