Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtSql.QSqlRecord Class Reference

The QSqlRecord class encapsulates a database record. More...

Inheritance diagram for QtSql.QSqlRecord:
Collaboration diagram for QtSql.QSqlRecord:

Public Member Functions

override bool Equals (object o)
 
override int GetHashCode ()
 
 QSqlRecord ()
 
 
 QSqlRecord (QSqlRecord other)
 
 
virtual void CreateProxy ()
 
new void Append (QSqlField field)
 
 
new void Clear ()
 
 
new void ClearValues ()
 
 
new bool Contains (string name)
 
 
new int Count ()
 
 
new QSqlField Field (int i)
 
 
new QSqlField Field (string name)
 
 
new string FieldName (int i)
 
 
new int IndexOf (string name)
 
 
new void Insert (int pos, QSqlField field)
 
 
new bool IsEmpty ()
 
 
new bool IsGenerated (int i)
 
 
new bool IsGenerated (string name)
 
 
new bool IsNull (int i)
 
 
new bool IsNull (string name)
 
 
new void Remove (int pos)
 
 
new void Replace (int pos, QSqlField field)
 
 
new void SetGenerated (string name, bool generated)
 
 
new void SetGenerated (int i, bool generated)
 
 
new void SetNull (int i)
 
 
new void SetNull (string name)
 
 
new void SetValue (int i, object val)
 
 
new void SetValue (string name, object val)
 
 
new object Value (int i)
 
 
new object Value (string name)
 
 
new void Dispose ()
 

Static Public Member Functions

static bool operator!= (QSqlRecord arg1, QSqlRecord arg2)
 
 
static bool operator== (QSqlRecord arg1, QSqlRecord arg2)
 
 

Protected Member Functions

 QSqlRecord (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QSqlRecord class encapsulates a database record.

The QSqlRecord class encapsulates the functionality and characteristics of a database record (usually a row in a table or view within the database). QSqlRecord supports adding and removing fields as well as setting and retrieving field values.

The values of a record's fields' can be set by name or position with setValue(); if you want to set a field to null use setNull(). To find the position of a field by name use indexOf(), and to find the name of a field at a particular position use fieldName(). Use field() to retrieve a QSqlField object for a given field. Use contains() to see if the record contains a particular field name.

When queries are generated to be executed on the database only those fields for which isGenerated() is true are included in the generated SQL.

A record can have fields added with append() or insert(), replaced with replace(), and removed with remove(). All the fields can be removed with clear(). The number of fields is given by count(); all their values can be cleared (to null) using clearValues().

See also QSqlField and QSqlQuery::record().

Constructor & Destructor Documentation

QtSql.QSqlRecord.QSqlRecord ( System.Type  dummy)
protected
QtSql.QSqlRecord.QSqlRecord ( )

Constructs an empty record.

See also isEmpty(), append(), and insert().

QtSql.QSqlRecord.QSqlRecord ( QSqlRecord  other)

Constructs a copy of other.

QSqlRecord is implicitly shared. This means you can make copies of a record in constant time.

Member Function Documentation

new void QtSql.QSqlRecord.Append ( QSqlField  field)

Append a copy of field field to the end of the record.

See also insert(), replace(), and remove().

new void QtSql.QSqlRecord.Clear ( )

Removes all the record's fields.

See also clearValues() and isEmpty().

new void QtSql.QSqlRecord.ClearValues ( )

Clears the value of all fields in the record and sets each field to null.

See also setValue().

new bool QtSql.QSqlRecord.Contains ( string  name)

Returns true if there is a field in the record called name; otherwise returns false.

new int QtSql.QSqlRecord.Count ( )

Returns the number of fields in the record.

See also isEmpty().

virtual void QtSql.QSqlRecord.CreateProxy ( )
virtual

Reimplemented in QtSql.QSqlIndex.

new void QtSql.QSqlRecord.Dispose ( )
override bool QtSql.QSqlRecord.Equals ( object  o)
new QSqlField QtSql.QSqlRecord.Field ( int  i)

Returns the field at position index. If the index is out of range, function returns a default-constructed value.

new QSqlField QtSql.QSqlRecord.Field ( string  name)

This is an overloaded function.

Returns the field called name.

new string QtSql.QSqlRecord.FieldName ( int  i)

Returns the name of the field at position index. If the field does not exist, an empty string is returned.

See also indexOf().

override int QtSql.QSqlRecord.GetHashCode ( )
new int QtSql.QSqlRecord.IndexOf ( string  name)

Returns the position of the field called name within the record, or -1 if it cannot be found. Field names are not case-sensitive. If more than one field matches, the first one is returned.

See also fieldName().

new void QtSql.QSqlRecord.Insert ( int  pos,
QSqlField  field 
)

Inserts the field field at position pos in the record.

See also append(), replace(), and remove().

new bool QtSql.QSqlRecord.IsEmpty ( )

Returns true if there are no fields in the record; otherwise returns false.

See also append(), insert(), and clear().

new bool QtSql.QSqlRecord.IsGenerated ( int  i)

This is an overloaded function.

Returns true if the record has a field at position index and this field is to be generated (the default); otherwise returns false.

See also setGenerated().

new bool QtSql.QSqlRecord.IsGenerated ( string  name)

Returns true if the record has a field called name and this field is to be generated (the default); otherwise returns false.

See also setGenerated().

new bool QtSql.QSqlRecord.IsNull ( int  i)

This is an overloaded function.

Returns true if the field index is null or if there is no field at position index; otherwise returns false.

new bool QtSql.QSqlRecord.IsNull ( string  name)

Returns true if the field called name is null or if there is no field called name; otherwise returns false.

See also setNull().

static bool QtSql.QSqlRecord.operator!= ( QSqlRecord  arg1,
QSqlRecord  arg2 
)
static

Returns true if this object is not identical to other; otherwise returns false.

See also operator==().

static bool QtSql.QSqlRecord.operator== ( QSqlRecord  arg1,
QSqlRecord  arg2 
)
static

Returns true if this object is identical to other (i.e., has the same fields in the same order); otherwise returns false.

See also operator!=().

new void QtSql.QSqlRecord.Remove ( int  pos)

Removes the field at position pos. If pos is out of range, nothing happens.

See also append(), insert(), and replace().

new void QtSql.QSqlRecord.Replace ( int  pos,
QSqlField  field 
)

Replaces the field at position pos with the given field. If pos is out of range, nothing happens.

See also append(), insert(), and remove().

new void QtSql.QSqlRecord.SetGenerated ( string  name,
bool  generated 
)

Sets the generated flag for the field called name to generated. If the field does not exist, nothing happens. Only fields that have generated set to true are included in the SQL that is generated by QSqlQueryModel for example.

See also isGenerated().

new void QtSql.QSqlRecord.SetGenerated ( int  i,
bool  generated 
)

This is an overloaded function.

Sets the generated flag for the field index to generated.

See also isGenerated().

new void QtSql.QSqlRecord.SetNull ( int  i)

Sets the value of field index to null. If the field does not exist, nothing happens.

See also isNull() and setValue().

new void QtSql.QSqlRecord.SetNull ( string  name)

This is an overloaded function.

Sets the value of the field called name to null. If the field does not exist, nothing happens.

new void QtSql.QSqlRecord.SetValue ( int  i,
object  val 
)

Sets the value of the field at position index to val. If the field does not exist, nothing happens.

See also value() and setNull().

new void QtSql.QSqlRecord.SetValue ( string  name,
object  val 
)

This is an overloaded function.

Sets the value of the field called name to val. If the field does not exist, nothing happens.

new object QtSql.QSqlRecord.Value ( int  i)

Returns the value of the field located at position index in the record. If index is out of bounds, an invalid QVariant is returned.

See also setValue(), fieldName(), and isNull().

new object QtSql.QSqlRecord.Value ( string  name)

This is an overloaded function.

Returns the value of the field called name in the record. If field name does not exist an invalid variant is returned.

See also indexOf().

Member Data Documentation

SmokeInvocation QtSql.QSqlRecord.interceptor
protected

Property Documentation

virtual System.IntPtr QtSql.QSqlRecord.SmokeObject
getset