NSEntity class
A database entity. Owned instances free native memory automatically on GC.
Instances returned from NSQueryResults are borrowed — they are only valid while the parent NSQueryResults is alive.
- Implemented types
Properties
-
handle
→ Pointer<
ns_entity_t> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOwned → bool
-
Whether this wrapper owns the native entity and will destroy it on GC.
no setter
- key → NSKey
-
This entity's key.
no setter
-
propertyNames
→ List<
String> -
Names of user-visible properties on this entity.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
destroy(
) → void - Destroy the native entity now instead of waiting for GC.
-
getProperty<
T> (String name) → T? - Read a property by name with a runtime type check.
-
listElementType(
String name) → NSPropertyType - Element type for a NSPropertyType.list property.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
propertyType(
String name) → NSPropertyType -
setProperty(
String name, Object? value) → void -
Set a property;
valuetype selects the native setter. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
borrowed(
Pointer< ns_entity_t> entity) → NSEntity - Wraps a native entity pointer returned from a query result set.
-
owned(
Pointer< ns_entity_t> entity) → NSEntity - Wraps a native entity pointer the caller must destroy (e.g. from NSDatabase.get).