public class DataAttributesAccessor : DataAttributesBase
extension DataAttributesAccessor: NativeBase
extension DataAttributesAccessor: Hashable

Accessor used for manipulating data attributes.

Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.

  • Returns a list of attribute names.

    Declaration

    Swift

    public func getAttributeNames() -> [String]

    Return Value

    The list of attribute names.

  • Returns the value type of an attribute or null if it is not contained.

    Declaration

    Swift

    public func getValueType(_ name: String) -> DataAttributeValue.ValueType?

    Parameters

    name

    Attribute name.

    Return Value

    Attribute value type or null if it is not contained.

  • Gets the value of an attribute as a string or null if it is not contained.

    Declaration

    Swift

    public func getAsString(_ name: String) -> String?

    Parameters

    name

    Attribute name.

    Return Value

    Attribute value.

  • Gets the value of a string attribute or null if it is not contained or the type doesn’t match.

    Declaration

    Swift

    public func getString(_ name: String) -> String?

    Parameters

    name

    Attribute name.

    Return Value

    Attribute value.

  • Gets the value of a 64-bits integer attribute or null if it is not contained or the type doesn’t match.

    Declaration

    Swift

    public func getInt64(_ name: String) -> Int64?

    Parameters

    name

    Attribute name.

    Return Value

    Attribute value.

  • Gets the value of a single precision floating decimal attribute or null if it is not contained or the type doesn’t match.

    Declaration

    Swift

    public func getFloat(_ name: String) -> Float?

    Parameters

    name

    Attribute name.

    Return Value

    Attribute value.

  • Gets the value of a double precision floating decimal attribute or null if it is not contained or the type doesn’t match.

    Declaration

    Swift

    public func getDouble(_ name: String) -> Double?

    Parameters

    name

    Attribute name.

    Return Value

    Attribute value.

  • Gets the value of a boolean attribute or null if it is not contained or the type doesn’t match.

    Declaration

    Swift

    public func getBoolean(_ name: String) -> Bool?

    Parameters

    name

    Attribute name.

    Return Value

    Attribute value.

  • Gets the DataAttributeValue or null if it is not contained.

    Declaration

    Swift

    public func getValue(_ name: String) -> DataAttributeValue?

    Parameters

    name

    Attribute name.

    Return Value

    Attribute value.

  • Adds or replaces a string attribute.

    Declaration

    Swift

    public func addOrReplace(name: String, value: String)

    Parameters

    name

    Attribute name.

    value

    Attribute value.

  • Adds or replaces a 64-bits integer attribute.

    Declaration

    Swift

    public func addOrReplace(name: String, value: Int64)

    Parameters

    name

    Attribute name.

    value

    Attribute value.

  • Adds or replaces a single precision floating decimal attribute.

    Declaration

    Swift

    public func addOrReplace(name: String, value: Float)

    Parameters

    name

    Attribute name.

    value

    Attribute value.

  • Adds or replaces a double precision floating decimal attribute.

    Declaration

    Swift

    public func addOrReplace(name: String, value: Double)

    Parameters

    name

    Attribute name.

    value

    Attribute value.

  • Adds or replaces a boolean attribute.

    Declaration

    Swift

    public func addOrReplace(name: String, value: Bool)

    Parameters

    name

    Attribute name.

    value

    Attribute value.

  • Adds or replaces an attribute.

    Declaration

    Swift

    public func addOrReplace(name: String, value: DataAttributeValue)

    Parameters

    name

    Attribute name.

    value

    Attribute value.

  • Removes an attribute by name.

    Declaration

    Swift

    public func remove(name: String)

    Parameters

    name

    Attribute name.

  • Removes all attributes.

    Declaration

    Swift

    public func removeAll()