Changeset View
Changeset View
Standalone View
Standalone View
src/drivers/postgresql/PostgresqlCursor.cpp
Show All 23 Lines | |||||
24 | #include "PostgresqlDriver.h" | 24 | #include "PostgresqlDriver.h" | ||
25 | #include "postgresql_debug.h" | 25 | #include "postgresql_debug.h" | ||
26 | 26 | | |||
27 | #include "KDbError.h" | 27 | #include "KDbError.h" | ||
28 | #include "KDbGlobal.h" | 28 | #include "KDbGlobal.h" | ||
29 | #include "KDbRecordData.h" | 29 | #include "KDbRecordData.h" | ||
30 | 30 | | |||
31 | // Constructor based on query statement | 31 | // Constructor based on query statement | ||
32 | PostgresqlCursor::PostgresqlCursor(KDbConnection* conn, const KDbEscapedString& sql, int options) | 32 | PostgresqlCursor::PostgresqlCursor(KDbConnection* conn, const KDbEscapedString& sql, | ||
33 | : KDbCursor(conn, sql, options) | 33 | KDbCursor::Options options) | ||
34 | : KDbCursor(conn, sql, options | KDbCursor::Option::Buffered) | ||||
34 | , m_numRows(0) | 35 | , m_numRows(0) | ||
35 | , d(new PostgresqlCursorData(conn)) | 36 | , d(new PostgresqlCursorData(conn)) | ||
36 | { | 37 | { | ||
37 | m_options |= Buffered; | | |||
38 | } | 38 | } | ||
39 | 39 | | |||
40 | //================================================================================== | 40 | //================================================================================== | ||
41 | //Constructor base on query object | 41 | //Constructor base on query object | ||
42 | PostgresqlCursor::PostgresqlCursor(KDbConnection* conn, KDbQuerySchema* query, int options) | 42 | PostgresqlCursor::PostgresqlCursor(KDbConnection* conn, KDbQuerySchema* query, | ||
43 | : KDbCursor(conn, query, options) | 43 | KDbCursor::Options options) | ||
44 | : KDbCursor(conn, query, options | KDbCursor::Option::Buffered) | ||||
44 | , m_numRows(0) | 45 | , m_numRows(0) | ||
45 | , d(new PostgresqlCursorData(conn)) | 46 | , d(new PostgresqlCursorData(conn)) | ||
46 | { | 47 | { | ||
47 | m_options |= Buffered; | | |||
48 | } | 48 | } | ||
49 | 49 | | |||
50 | //================================================================================== | 50 | //================================================================================== | ||
51 | //Destructor | 51 | //Destructor | ||
52 | PostgresqlCursor::~PostgresqlCursor() | 52 | PostgresqlCursor::~PostgresqlCursor() | ||
53 | { | 53 | { | ||
54 | close(); | 54 | close(); | ||
55 | delete d; | 55 | delete d; | ||
▲ Show 20 Lines • Show All 298 Lines • Show Last 20 Lines |