Class Native
java.lang.Object
com.surrealdb.Native
- Direct Known Subclasses:
Array, Entry, EntryIterator, EntryMut, FileRef, Geometry, Id, Object, RecordId, Response, Surreal, Transaction, Value, ValueIterator, ValueMut
Base for types backed by a native pointer. Each instance owns its native
object: the native side clones a shared reference or copies the data when it
creates the instance, so it stays valid on its own, independently of the
Value or connection it was obtained from. The native object is freed
when the instance is garbage collected.-
Method Summary
-
Method Details
-
close
public void close()Releases the native resources held by this instance right away, instead of when it is garbage collected. For aSurreal, this also closes its connection. Calling it more than once is safe. After this call, using the instance throws aNullPointerException.Instances obtained from this one (a value taken from a
Response, an element of anArray, a field of anObject, an entry's value, and so on) are not affected: each holds its own reference to the data, which is freed once every holder is closed or collected. -
equals
-
hashCode
-
toString
-