API reference - Class QSqlField

Notation used in Ruby API documentation

Description: Binding of QSqlField

Sub-classes: RequiredStatus

Public constructors

new QSqlFieldnew(string fieldName = QString(),
const QVariant_Type type = QVariant::Invalid)
Constructor QSqlField::QSqlField(const QString &fieldName, QVariant::Type type)
new QSqlFieldnew(const QSqlField other)Constructor QSqlField::QSqlField(const QSqlField &other)

Public methods

[const]bool!=(const QSqlField other)Method bool QSqlField::operator!=(const QSqlField &other)
[const]bool==(const QSqlField other)Method bool QSqlField::operator==(const QSqlField &other)
void_assign(const QSqlField other)Assigns another object to self
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
QSqlFieldassign(const QSqlField other)Method QSqlField &QSqlField::operator=(const QSqlField &other)
[const]boolautoValueMethod bool QSqlField::isAutoValue()
voidautoValue=(bool autoVal)Method void QSqlField::setAutoValue(bool autoVal)
voidclearMethod void QSqlField::clear()
[const]QVariantdefaultValueMethod QVariant QSqlField::defaultValue()
voiddefaultValue=(const QVariant value)Method void QSqlField::setDefaultValue(const QVariant &value)
[const]new QSqlField ptrdupCreates a copy of self
[const]boolgeneratedMethod bool QSqlField::isGenerated()
voidgenerated=(bool gen)Method void QSqlField::setGenerated(bool gen)
[const]boolisAutoValue?Method bool QSqlField::isAutoValue()
[const]boolisGenerated?Method bool QSqlField::isGenerated()
[const]boolisNull?Method bool QSqlField::isNull()
[const]boolisReadOnly?Method bool QSqlField::isReadOnly()
[const]boolisValid?Method bool QSqlField::isValid()
[const]intlengthMethod int QSqlField::length()
voidlength=(int fieldLength)Method void QSqlField::setLength(int fieldLength)
[const]stringnameMethod QString QSqlField::name()
voidname=(string name)Method void QSqlField::setName(const QString &name)
[const]intprecisionMethod int QSqlField::precision()
voidprecision=(int precision)Method void QSqlField::setPrecision(int precision)
[const]boolreadOnlyMethod bool QSqlField::isReadOnly()
voidreadOnly=(bool readOnly)Method void QSqlField::setReadOnly(bool readOnly)
[const]QSqlField_RequiredStatusrequiredStatusMethod QSqlField::RequiredStatus QSqlField::requiredStatus()
voidrequiredStatus=(const QSqlField_RequiredStatus status)Method void QSqlField::setRequiredStatus(QSqlField::RequiredStatus status)
voidsetAutoValue(bool autoVal)Method void QSqlField::setAutoValue(bool autoVal)
voidsetDefaultValue(const QVariant value)Method void QSqlField::setDefaultValue(const QVariant &value)
voidsetGenerated(bool gen)Method void QSqlField::setGenerated(bool gen)
voidsetLength(int fieldLength)Method void QSqlField::setLength(int fieldLength)
voidsetName(string name)Method void QSqlField::setName(const QString &name)
voidsetPrecision(int precision)Method void QSqlField::setPrecision(int precision)
voidsetReadOnly(bool readOnly)Method void QSqlField::setReadOnly(bool readOnly)
voidsetRequired(bool required)Method void QSqlField::setRequired(bool required)
voidsetRequiredStatus(const QSqlField_RequiredStatus status)Method void QSqlField::setRequiredStatus(QSqlField::RequiredStatus status)
voidsetSqlType(int type)Method void QSqlField::setSqlType(int type)
voidsetType(const QVariant_Type type)Method void QSqlField::setType(QVariant::Type type)
voidsetValue(const QVariant value)Method void QSqlField::setValue(const QVariant &value)
[const]QVariant_TypetypeMethod QVariant::Type QSqlField::type()
voidtype=(const QVariant_Type type)Method void QSqlField::setType(QVariant::Type type)
[const]inttypeIDMethod int QSqlField::typeID()
[const]QVariantvalueMethod QVariant QSqlField::value()
voidvalue=(const QVariant value)Method void QSqlField::setValue(const QVariant &value)

Public static methods and constants

[static,const]new QSqlField_RequiredStatus ptrOptionalEnum constant QSqlField::Optional
[static,const]new QSqlField_RequiredStatus ptrRequiredEnum constant QSqlField::Required
[static,const]new QSqlField_RequiredStatus ptrUnknownEnum constant QSqlField::Unknown

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

[const] bool !=(const QSqlField other)

Description: Method bool QSqlField::operator!=(const QSqlField &other)

[const] bool ==(const QSqlField other)

Description: Method bool QSqlField::operator==(const QSqlField &other)

[static,const] new QSqlField_RequiredStatus ptr Optional

Description: Enum constant QSqlField::Optional

[static,const] new QSqlField_RequiredStatus ptr Required

Description: Enum constant QSqlField::Required

[static,const] new QSqlField_RequiredStatus ptr Unknown

Description: Enum constant QSqlField::Unknown

void _assign(const QSqlField other)

Description: Assigns another object to self

void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

[const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

QSqlField assign(const QSqlField other)

Description: Method QSqlField &QSqlField::operator=(const QSqlField &other)

[const] bool autoValue

Description: Method bool QSqlField::isAutoValue()

Python specific notes:

The object exposes a readable attribute 'autoValue'. This is the getter.

void autoValue=(bool autoVal)

Description: Method void QSqlField::setAutoValue(bool autoVal)

Python specific notes:

The object exposes a writable attribute 'autoValue'. This is the setter.

void clear

Description: Method void QSqlField::clear()

void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

[const] QVariant defaultValue

Description: Method QVariant QSqlField::defaultValue()

Python specific notes:

The object exposes a readable attribute 'defaultValue'. This is the getter.

void defaultValue=(const QVariant value)

Description: Method void QSqlField::setDefaultValue(const QVariant &value)

Python specific notes:

The object exposes a writable attribute 'defaultValue'. This is the setter.

void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

[const] new QSqlField ptr dup

Description: Creates a copy of self

[const] bool generated

Description: Method bool QSqlField::isGenerated()

Python specific notes:

The object exposes a readable attribute 'generated'. This is the getter.

void generated=(bool gen)

Description: Method void QSqlField::setGenerated(bool gen)

Python specific notes:

The object exposes a writable attribute 'generated'. This is the setter.

[const] bool isAutoValue?

Description: Method bool QSqlField::isAutoValue()

Python specific notes:

The object exposes a readable attribute 'autoValue'. This is the getter.

[const] bool isGenerated?

Description: Method bool QSqlField::isGenerated()

Python specific notes:

The object exposes a readable attribute 'generated'. This is the getter.

[const] bool isNull?

Description: Method bool QSqlField::isNull()

[const] bool isReadOnly?

Description: Method bool QSqlField::isReadOnly()

Python specific notes:

The object exposes a readable attribute 'readOnly'. This is the getter.

[const] bool isValid?

Description: Method bool QSqlField::isValid()

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

[const] int length

Description: Method int QSqlField::length()

Python specific notes:

The object exposes a readable attribute 'length'. This is the getter.

void length=(int fieldLength)

Description: Method void QSqlField::setLength(int fieldLength)

Python specific notes:

The object exposes a writable attribute 'length'. This is the setter.

[const] string name

Description: Method QString QSqlField::name()

Python specific notes:

The object exposes a readable attribute 'name'. This is the getter.

void name=(string name)

Description: Method void QSqlField::setName(const QString &name)

Python specific notes:

The object exposes a writable attribute 'name'. This is the setter.

[static] new QSqlField new(string fieldName = QString(),const QVariant_Type type = QVariant::Invalid)

Description: Constructor QSqlField::QSqlField(const QString &fieldName, QVariant::Type type)

This method creates an object of class QSqlField.

Python specific notes:

This method is the default initializer of the object

[static] new QSqlField new(const QSqlField other)

Description: Constructor QSqlField::QSqlField(const QSqlField &other)

This method creates an object of class QSqlField.

Python specific notes:

This method is the default initializer of the object

[const] int precision

Description: Method int QSqlField::precision()

Python specific notes:

The object exposes a readable attribute 'precision'. This is the getter.

void precision=(int precision)

Description: Method void QSqlField::setPrecision(int precision)

Python specific notes:

The object exposes a writable attribute 'precision'. This is the setter.

[const] bool readOnly

Description: Method bool QSqlField::isReadOnly()

Python specific notes:

The object exposes a readable attribute 'readOnly'. This is the getter.

void readOnly=(bool readOnly)

Description: Method void QSqlField::setReadOnly(bool readOnly)

Python specific notes:

The object exposes a writable attribute 'readOnly'. This is the setter.

[const] QSqlField_RequiredStatus requiredStatus

Description: Method QSqlField::RequiredStatus QSqlField::requiredStatus()

Python specific notes:

The object exposes a readable attribute 'requiredStatus'. This is the getter.

void requiredStatus=(const QSqlField_RequiredStatus status)

Description: Method void QSqlField::setRequiredStatus(QSqlField::RequiredStatus status)

Python specific notes:

The object exposes a writable attribute 'requiredStatus'. This is the setter.

void setAutoValue(bool autoVal)

Description: Method void QSqlField::setAutoValue(bool autoVal)

Python specific notes:

The object exposes a writable attribute 'autoValue'. This is the setter.

void setDefaultValue(const QVariant value)

Description: Method void QSqlField::setDefaultValue(const QVariant &value)

Python specific notes:

The object exposes a writable attribute 'defaultValue'. This is the setter.

void setGenerated(bool gen)

Description: Method void QSqlField::setGenerated(bool gen)

Python specific notes:

The object exposes a writable attribute 'generated'. This is the setter.

void setLength(int fieldLength)

Description: Method void QSqlField::setLength(int fieldLength)

Python specific notes:

The object exposes a writable attribute 'length'. This is the setter.

void setName(string name)

Description: Method void QSqlField::setName(const QString &name)

Python specific notes:

The object exposes a writable attribute 'name'. This is the setter.

void setPrecision(int precision)

Description: Method void QSqlField::setPrecision(int precision)

Python specific notes:

The object exposes a writable attribute 'precision'. This is the setter.

void setReadOnly(bool readOnly)

Description: Method void QSqlField::setReadOnly(bool readOnly)

Python specific notes:

The object exposes a writable attribute 'readOnly'. This is the setter.

void setRequired(bool required)

Description: Method void QSqlField::setRequired(bool required)

void setRequiredStatus(const QSqlField_RequiredStatus status)

Description: Method void QSqlField::setRequiredStatus(QSqlField::RequiredStatus status)

Python specific notes:

The object exposes a writable attribute 'requiredStatus'. This is the setter.

void setSqlType(int type)

Description: Method void QSqlField::setSqlType(int type)

void setType(const QVariant_Type type)

Description: Method void QSqlField::setType(QVariant::Type type)

Python specific notes:

The object exposes a writable attribute 'type'. This is the setter.

void setValue(const QVariant value)

Description: Method void QSqlField::setValue(const QVariant &value)

Python specific notes:

The object exposes a writable attribute 'value'. This is the setter.

[const] QVariant_Type type

Description: Method QVariant::Type QSqlField::type()

Python specific notes:

The object exposes a readable attribute 'type'. This is the getter.

void type=(const QVariant_Type type)

Description: Method void QSqlField::setType(QVariant::Type type)

Python specific notes:

The object exposes a writable attribute 'type'. This is the setter.

[const] int typeID

Description: Method int QSqlField::typeID()

[const] QVariant value

Description: Method QVariant QSqlField::value()

Python specific notes:

The object exposes a readable attribute 'value'. This is the getter.

void value=(const QVariant value)

Description: Method void QSqlField::setValue(const QVariant &value)

Python specific notes:

The object exposes a writable attribute 'value'. This is the setter.