kexi

Kross::KexiDB::KexiDBFieldList Class Reference

#include <kexidbfieldlist.h>

Public Member Functions

 KexiDBFieldList (::KexiDB::FieldList *fieldlist)
virtual const TQString getClassName () const
::KexiDB::FieldList * fieldlist ()

Detailed Description

A list of fields.

The KexiDBFieldList can be used to handle KexiDBField objects in a backend-independent way.

Example (in Python) ;

# Get the tableschema for the "dept" table.
table = connection.tableSchema("dept")
# Create a KexiDBFieldList based on the table and filled with the selected fields.
subfields = ["deptno","name","loc"]
fieldlist = table.fieldlist().subList(subfields)
# Create the "SELECT * from dept;" queryschema.
query = table.query()
# We change the queryschema to "SELECT deptno,name,loc FROM dept;" now.
query.fieldlist().setFields(fieldlist)
# and change the query to "SELECT deptno,name,loc FROM dept WHERE deptno=5;"
query.setWhereExpression("deptno=5")
# Execute the query and get a KexiDBCursor object as result which could be used to iterate through the result.
cursor = connection.executeQuerySchema(query)

Definition at line 59 of file kexidbfieldlist.h.

Constructor & Destructor Documentation

◆ KexiDBFieldList()

KexiDBFieldList::KexiDBFieldList ( ::KexiDB::FieldList * fieldlist)

Definition at line 30 of file kexidbfieldlist.cpp.

◆ ~KexiDBFieldList()

KexiDBFieldList::~KexiDBFieldList ( )
virtual

Definition at line 52 of file kexidbfieldlist.cpp.

Member Function Documentation

◆ fieldlist()

::KexiDB::FieldList * Kross::KexiDB::KexiDBFieldList::fieldlist ( )
inline

Definition at line 65 of file kexidbfieldlist.h.

◆ getClassName()

const TQString KexiDBFieldList::getClassName ( ) const
virtual

Definition at line 56 of file kexidbfieldlist.cpp.


The documentation for this class was generated from the following files: