KLayout 0.29.8 (2024-10-28 63dd591e5) [master]

API reference - Class QSqlField

Notation used in Ruby API documentation

Module: QtSql

Description: Binding of QSqlField

Sub-classes: RequiredStatus, QFlags_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
[const]QSqlField ptr_const_castReturns a non-const reference 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]variantdefaultValueMethod QVariant QSqlField::defaultValue()
voiddefaultValue=(variant 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(variant 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(variant 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]variantvalueMethod QVariant QSqlField::value()
voidvalue=(variant value)Method void QSqlField::setValue(const QVariant &value)

Public static methods and constants

[static,const]QSqlField_RequiredStatusOptionalEnum constant QSqlField::Optional
[static,const]QSqlField_RequiredStatusRequiredEnum constant QSqlField::Required
[static,const]QSqlField_RequiredStatusUnknownEnum 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

!=

Signature: [const] bool != (const QSqlField other)

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

==

Signature: [const] bool == (const QSqlField other)

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

Optional

Signature: [static,const] QSqlField_RequiredStatus Optional

Description: Enum constant QSqlField::Optional

Python specific notes:
The object exposes a readable attribute 'Optional'. This is the getter.

Required

Signature: [static,const] QSqlField_RequiredStatus Required

Description: Enum constant QSqlField::Required

Python specific notes:
The object exposes a readable attribute 'Required'. This is the getter.

Unknown

Signature: [static,const] QSqlField_RequiredStatus Unknown

Description: Enum constant QSqlField::Unknown

Python specific notes:
The object exposes a readable attribute 'Unknown'. This is the getter.

_assign

Signature: void _assign (const QSqlField other)

Description: Assigns another object to self

_const_cast

Signature: [const] QSqlField ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_create

Signature: 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.

_destroy

Signature: 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.

_destroyed?

Signature: [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.

_is_const_object?

Signature: [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.

_manage

Signature: 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.

_unmanage

Signature: 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.

assign

Signature: QSqlField assign (const QSqlField other)

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

autoValue

Signature: [const] bool autoValue

Description: Method bool QSqlField::isAutoValue()

Python specific notes:
The object exposes a readable attribute 'autoValue'. This is the getter.

autoValue=

Signature: 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.

clear

Signature: void clear

Description: Method void QSqlField::clear()

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

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.

defaultValue

Signature: [const] variant defaultValue

Description: Method QVariant QSqlField::defaultValue()

Python specific notes:
The object exposes a readable attribute 'defaultValue'. This is the getter.

defaultValue=

Signature: void defaultValue= (variant value)

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

Python specific notes:
The object exposes a writable attribute 'defaultValue'. This is the setter.

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

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.

destroyed?

Signature: [const] bool destroyed?

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

Use of this method is deprecated. Use _destroyed? instead

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.

dup

Signature: [const] new QSqlField ptr dup

Description: Creates a copy of self

Python specific notes:
This method also implements '__copy__' and '__deepcopy__'.

generated

Signature: [const] bool generated

Description: Method bool QSqlField::isGenerated()

Python specific notes:
The object exposes a readable attribute 'generated'. This is the getter.

generated=

Signature: 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.

isAutoValue?

Signature: [const] bool isAutoValue?

Description: Method bool QSqlField::isAutoValue()

Python specific notes:
The object exposes a readable attribute 'autoValue'. This is the getter.

isGenerated?

Signature: [const] bool isGenerated?

Description: Method bool QSqlField::isGenerated()

Python specific notes:
The object exposes a readable attribute 'generated'. This is the getter.

isNull?

Signature: [const] bool isNull?

Description: Method bool QSqlField::isNull()

isReadOnly?

Signature: [const] bool isReadOnly?

Description: Method bool QSqlField::isReadOnly()

Python specific notes:
The object exposes a readable attribute 'readOnly'. This is the getter.

isValid?

Signature: [const] bool isValid?

Description: Method bool QSqlField::isValid()

is_const_object?

Signature: [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

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

length

Signature: [const] int length

Description: Method int QSqlField::length()

Python specific notes:
The object exposes a readable attribute 'length'. This is the getter.

length=

Signature: 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.

name

Signature: [const] string name

Description: Method QString QSqlField::name()

Python specific notes:
The object exposes a readable attribute 'name'. This is the getter.

name=

Signature: 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.

new

(1) Signature: [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.

(2) Signature: [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.

precision

Signature: [const] int precision

Description: Method int QSqlField::precision()

Python specific notes:
The object exposes a readable attribute 'precision'. This is the getter.

precision=

Signature: 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.

readOnly

Signature: [const] bool readOnly

Description: Method bool QSqlField::isReadOnly()

Python specific notes:
The object exposes a readable attribute 'readOnly'. This is the getter.

readOnly=

Signature: 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.

requiredStatus

Signature: [const] QSqlField_RequiredStatus requiredStatus

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

Python specific notes:
The object exposes a readable attribute 'requiredStatus'. This is the getter.

requiredStatus=

Signature: 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.

setAutoValue

Signature: 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.

setDefaultValue

Signature: void setDefaultValue (variant value)

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

Python specific notes:
The object exposes a writable attribute 'defaultValue'. This is the setter.

setGenerated

Signature: 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.

setLength

Signature: 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.

setName

Signature: 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.

setPrecision

Signature: 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.

setReadOnly

Signature: 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.

setRequired

Signature: void setRequired (bool required)

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

setRequiredStatus

Signature: 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.

setSqlType

Signature: void setSqlType (int type)

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

setType

Signature: 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.

setValue

Signature: void setValue (variant value)

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

Python specific notes:
The object exposes a writable attribute 'value'. This is the setter.

type

Signature: [const] QVariant_Type type

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

Python specific notes:
The object exposes a readable attribute 'type'. This is the getter.

type=

Signature: 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.

typeID

Signature: [const] int typeID

Description: Method int QSqlField::typeID()

value

Signature: [const] variant value

Description: Method QVariant QSqlField::value()

Python specific notes:
The object exposes a readable attribute 'value'. This is the getter.

value=

Signature: void value= (variant value)

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

Python specific notes:
The object exposes a writable attribute 'value'. This is the setter.