Changeset View
Changeset View
Standalone View
Standalone View
src/migration/keximigrate.h
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Line(s) | 139 | //! @todo This is copied from KDbDriver. One day it will be merged with KDb. | |||
---|---|---|---|---|---|
150 | 150 | | |||
151 | //! Get table names in source database (driver specific) | 151 | //! Get table names in source database (driver specific) | ||
152 | bool tableNames(QStringList *tablenames); | 152 | bool tableNames(QStringList *tablenames); | ||
153 | 153 | | |||
154 | //! Read schema for a given table (driver specific) | 154 | //! Read schema for a given table (driver specific) | ||
155 | bool readTableSchema(const QString& originalName, KDbTableSchema *tableSchema); | 155 | bool readTableSchema(const QString& originalName, KDbTableSchema *tableSchema); | ||
156 | 156 | | |||
157 | //! Starts reading data from the source dataset's table | 157 | //! Starts reading data from the source dataset's table | ||
158 | KDbSqlResult* readFromTable(const QString& tableName); | 158 | QSharedPointer<KDbSqlResult> readFromTable(const QString& tableName); | ||
159 | 159 | | |||
160 | //!Move to the next row | 160 | //!Move to the next row | ||
161 | bool moveNext(); | 161 | bool moveNext(); | ||
162 | 162 | | |||
163 | //!Move to the previous row | 163 | //!Move to the previous row | ||
164 | bool movePrevious(); | 164 | bool movePrevious(); | ||
165 | 165 | | |||
166 | //!Move to the next row | 166 | //!Move to the next row | ||
▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Line(s) | 274 | virtual tristate drv_querySingleStringFromSQL(const KDbEscapedString& sqlStatement, | |||
275 | int columnNumber, QString *string); | 275 | int columnNumber, QString *string); | ||
276 | 276 | | |||
277 | //! A functor for filtering records | 277 | //! A functor for filtering records | ||
278 | //! @see drv_copyTable() | 278 | //! @see drv_copyTable() | ||
279 | class RecordFilter { | 279 | class RecordFilter { | ||
280 | public: | 280 | public: | ||
281 | RecordFilter() {} | 281 | RecordFilter() {} | ||
282 | virtual ~RecordFilter() {} | 282 | virtual ~RecordFilter() {} | ||
283 | virtual bool operator() (const KDbSqlRecord &record) const = 0; | 283 | virtual bool operator() (const QSharedPointer<KDbSqlRecord> &record) const = 0; | ||
284 | virtual bool operator() (const QList<QVariant> &record) const = 0; | 284 | virtual bool operator() (const QList<QVariant> &record) const = 0; | ||
285 | }; | 285 | }; | ||
286 | 286 | | |||
287 | //! Copy a table from source DB to target DB (driver specific) | 287 | //! Copy a table from source DB to target DB (driver specific) | ||
288 | //! - create copies of KDb tables | 288 | //! - create copies of KDb tables | ||
289 | //! - create copies of non-KDb tables | 289 | //! - create copies of non-KDb tables | ||
290 | virtual bool drv_copyTable(const QString& srcTable, KDbConnection *destConn, | 290 | virtual bool drv_copyTable(const QString& srcTable, KDbConnection *destConn, | ||
291 | KDbTableSchema* dstTable, | 291 | KDbTableSchema* dstTable, | ||
Show All 29 Lines | |||||
321 | //! @todo user should be asked ONCE using a convenient wizard's page, not a popup dialog | 321 | //! @todo user should be asked ONCE using a convenient wizard's page, not a popup dialog | ||
322 | //! Prompt user to select a field type for unrecognized fields | 322 | //! Prompt user to select a field type for unrecognized fields | ||
323 | KDbField::Type userType(const QString& fname); | 323 | KDbField::Type userType(const QString& fname); | ||
324 | 324 | | |||
325 | virtual QString drv_escapeIdentifier(const QString& str) const; | 325 | virtual QString drv_escapeIdentifier(const QString& str) const; | ||
326 | 326 | | |||
327 | //Extended API | 327 | //Extended API | ||
328 | //! Position the source dataset at the start of a table | 328 | //! Position the source dataset at the start of a table | ||
329 | virtual KDbSqlResult* drv_readFromTable(const QString & tableName) { | 329 | virtual QSharedPointer<KDbSqlResult> drv_readFromTable(const QString & tableName) { | ||
330 | Q_UNUSED(tableName); | 330 | Q_UNUSED(tableName); | ||
331 | return nullptr; | 331 | return QSharedPointer<KDbSqlResult>(); | ||
332 | } | 332 | } | ||
333 | 333 | | |||
334 | //! Move to the next row | 334 | //! Move to the next row | ||
335 | virtual bool drv_moveNext() { return false; } | 335 | virtual bool drv_moveNext() { return false; } | ||
336 | 336 | | |||
337 | //! Move to the previous row | 337 | //! Move to the previous row | ||
338 | virtual bool drv_movePrevious() { return false; } | 338 | virtual bool drv_movePrevious() { return false; } | ||
339 | 339 | | |||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |