#include <FBwFieldList.h>
Public Methods | |
| FieldList (FBwDb *pdb) | |
| Constructor. | |
| void | Add (FBwField *pfld) |
| Add a field to the list. | |
| FBwField * | FindField (int idx) const |
| Find field in position idx. | |
| FBwField * | FindField (string fname) const |
| Find field with name fname. | |
| FBwField * | operator[] (int idx) const |
| Finds the field at index idx. | |
| FBwField * | operator[] (string fldname) const |
| Finds the field with name fldname. | |
| void | DestroyFields () |
| Delete all fields of the list. | |
| void | CreateFrom (XSQLDA *xsql) |
| void | CreateFrom (const FieldList &fl, int from=0, int to=-1) |
| void | BindParams (XSQLDA *xsql) |
| Binding a param list with input XSQLDA. | |
| FBwField * | CreateField (XSQLVAR &xv, int i) |
| Create a field from a XSQLVAR. | |
| void | ConvertStoV () |
| Changes from Firebird to fbwrap representation of value. | |
| void | ConvertVtoS () |
| Changes from fbwrap to Firebird representation of value. | |
| ~FieldList () | |
| Destructor. | |
| bool | IsEmpty () |
| int | Count () const |
| < Returns the number of fields in the list | |
| void | SetDb (FBwDb *pdb) |
| FieldList & | operator= (const FieldList &f) |
| FieldList copy operator. | |
| void | CopyByName (const FieldList &p) |
| Value copy from another FieldList by field name. | |
| void | CopyByIdx (const FieldList &p, int tfrom, int sfrom, int to) |
| void | SetAllNull () |
| Set all fields to NULL. | |
| void | SetUnasigned () |
| Set all fields as unasigned. | |
| int | ByteLen () |
| returns bytelen of field | |
| void | Write (char *p) |
| write field to buffer p | |
| void | Read (char *p) |
| read field from buffer p | |
Friends | |
| FieldList & | operator<< (FieldList &f, const string &s) |
| string insertion | |
| FieldList & | operator<< (FieldList &f, const char *s) |
| char * insertion | |
| FieldList & | operator<< (FieldList &f, const FBwDate &d) |
| FBwDate insertion. | |
| FieldList & | operator<< (FieldList &f, const FBwTime &t) |
| FBwTime insertion. | |
| FieldList & | operator<< (FieldList &f, const FBwDateTime &dt) |
| FBwDateTime insertion. | |
| FieldList & | operator<< (FieldList &f, int i) |
| int insertion | |
| FieldList & | operator<< (FieldList &f, long long int i) |
| long long int insertion | |
| FieldList & | operator<< (FieldList &f, double d) |
| double insertion | |
| FieldList & | operator<< (FieldList &f, const FieldListIndex &idx) |
| Changes internal field index, regard it as a manipulator. | |
This class replaces notion of table record, it holds a set of FBwField pointers wich receives data from table or view and are responsible for convertions from database representation to c++ representation of data. A field list can be created from a XSQLDA for exchanging data with fierebird. Also a parameter FieldList can be created for querys with input parameters. Has facilities for copy between field lists based on field order or field names ( remember old cobol MOVE CORRESPONDING! ).
The list has an implicit FieldListIndex wich points to the next field modified by an insertion operator<<. After the insertion the index is incremented and folded to zero when field Count() has been reached. You can alter the order of insertion by inserting a FieldListIndex object with the position you want.
|
|
Constructor.
|
|
|
Value copy from another FieldList by field name. Value Copy By name Value Copy By Index |
|
|
Creates a FieldsList from XSQLDA Creates a FieldsList from another fieldList |
|
|
|
1.2.17