FieldDescription Class

  • FieldDescription
  • class Esri::ArcGISRuntime::FieldDescription

    An object that describes a Field to be created. More...

    Header: #include <FieldDescription>
    Since: Esri::ArcGISRuntime 100.14
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    FieldDescription(const QString &name, Esri::ArcGISRuntime::FieldType fieldType, QObject *parent = nullptr)
    virtual ~FieldDescription() override
    QString alias() const
    QString domainName() const
    Esri::ArcGISRuntime::FieldType fieldType() const
    bool isEditable() const
    bool isNullable() const
    int length() const
    QString name() const
    void setAlias(const QString &alias)
    void setDomainName(const QString &domainName)
    void setEditable(bool editable)
    void setFieldType(Esri::ArcGISRuntime::FieldType fieldType)
    void setLength(int length)
    void setName(const QString &name)
    void setNullable(bool nullable)

    Detailed Description

    Creation of fields and tables is currently only supported on mobile geodatabases, either created in ArcGIS Pro or via Geodatabase::createAsync(const QString&, QObject*).

    Member Function Documentation

    FieldDescription::FieldDescription(const QString &name, Esri::ArcGISRuntime::FieldType fieldType, QObject *parent = nullptr)

    Creates a new field description object with the specified name and type.

    • name - The field's name.
    • fieldType - The field's data type.
    • parent - The optional parent QObject.

    [override virtual] FieldDescription::~FieldDescription()

    Destructor.

    QString FieldDescription::alias() const

    Returns the field's alias. The default value is an empty string.

    See also setAlias().

    QString FieldDescription::domainName() const

    Returns the name of the domain to use on this field.

    The domain must already exist in the geodatabase (see Geodatabase::createDomainAsync(Esri::ArcGISRuntime::DomainDescription*)). The default value of an empty string indicates that no domain should be used.

    See also setDomainName().

    Esri::ArcGISRuntime::FieldType FieldDescription::fieldType() const

    Returns the field's data type. The default is FieldType::Unknown, and must be set to a valid type.

    See also setFieldType().

    bool FieldDescription::isEditable() const

    Returns true if the field is editable. The default value is true.

    bool FieldDescription::isNullable() const

    Returns true if the field is nullable. The default value is true.

    int FieldDescription::length() const

    Returns the length of the field. The default value is 0. This only applies to text fields.

    See also setLength().

    QString FieldDescription::name() const

    Returns the field's name. Field names must consist only of alphanumeric characters and underscores, and cannot start with a number or an underscore.

    See also setName().

    void FieldDescription::setAlias(const QString &alias)

    Sets the alias to alias.

    See also alias.

    void FieldDescription::setDomainName(const QString &domainName)

    Sets the domainName to domainName.

    See also domainName.

    void FieldDescription::setEditable(bool editable)

    Sets the editable to editable.

    See also isEditable.

    void FieldDescription::setFieldType(Esri::ArcGISRuntime::FieldType fieldType)

    Sets the fieldType to fieldType.

    See also fieldType.

    void FieldDescription::setLength(int length)

    Sets the length to length.

    See also length.

    void FieldDescription::setName(const QString &name)

    Sets the name to name.

    See also name.

    void FieldDescription::setNullable(bool nullable)

    Sets the nullable to nullable.

    See also isNullable.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.