| 59 | |
| 60 | |
| 61 | class CppSQLite3Query |
| 62 | { |
| 63 | public: |
| 64 | |
| 65 | CppSQLite3Query(); |
| 66 | |
| 67 | CppSQLite3Query(const CppSQLite3Query& rQuery); |
| 68 | |
| 69 | CppSQLite3Query(sqlite3* pDB, sqlite3_stmt* pVM, bool bEof, bool bOwnVM=true); |
| 70 | |
| 71 | CppSQLite3Query& operator=(const CppSQLite3Query& rQuery); |
| 72 | |
| 73 | virtual ~CppSQLite3Query(); |
| 74 | |
| 75 | int numFields(); |
| 76 | |
| 77 | int fieldIndex(const CString& szField); |
| 78 | CString fieldName(int nCol); |
| 79 | |
| 80 | CString fieldDeclType(int nCol); |
| 81 | int fieldDataType(int nCol); |
| 82 | |
| 83 | const char* fieldValue(int nField); |
| 84 | const char* fieldValue(const CString& szField); |
| 85 | const unsigned short* fieldValue16(const CString& szField); |
| 86 | |
| 87 | int getIntField(int nField, int nNullValue=0); |
| 88 | int getIntField(const CString& szField, int nNullValue=0); |
| 89 | |
| 90 | __int64 getInt64Field(int nField, int nNullValue=0); |
| 91 | __int64 getInt64Field(const CString& szField, int nNullValue=0); |
| 92 | |
| 93 | BOOL getBoolField(int nField, BOOL bNullValue=FALSE); |
| 94 | BOOL getBoolField(const CString& szField, BOOL bNullValue=FALSE); |
| 95 | |
| 96 | double getFloatField(int nField, double fNullValue=0.0); |
| 97 | double getFloatField(const CString& szField, double fNullValue=0.0); |
| 98 | |
| 99 | WizOleDateTime getTimeField(int nField, time_t tNullValue = 0); |
| 100 | WizOleDateTime getTimeField(const CString& szField, time_t tNullValue = 0); |
| 101 | |
| 102 | COLORREF getColorField(int nField, COLORREF crNullValue = 0); |
| 103 | COLORREF getColorField(const CString& szField, COLORREF crNullValue = 0); |
| 104 | |
| 105 | QColor getColorField2(int nField, QColor crNullValue = QColor()); |
| 106 | QColor getColorField2(const CString& szField, QColor crNullValue = QColor()); |
| 107 | |
| 108 | CString getStringField(int nField, const CString& szNullValue = ""); |
| 109 | CString getStringField(const CString& szField, const CString& szNullValue=""); |
| 110 | // |
| 111 | int getColumnLength(int nField); |
| 112 | |
| 113 | const unsigned char* getBlobField(int nField, int& nLen); |
| 114 | const unsigned char* getBlobField(const CString& szField, int& nLen); |
| 115 | |
| 116 | bool fieldIsNull(int nField); |
| 117 | bool fieldIsNull(const CString& szField); |
| 118 | |