Package com.kuzudb
Class Value
java.lang.Object
com.kuzudb.Value
- All Implemented Interfaces:
AutoCloseable
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
close()
Close the value and release the underlying resources.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.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.
-
close
Close the value and release the underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.- Specified by:
close
in interfaceAutoCloseable
- Throws:
ObjectRefDestroyedException
- If the Value has been destroyed.
-
isOwnedByCPP
public boolean isOwnedByCPP() -
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.
-