Changeset View
Changeset View
Standalone View
Standalone View
src/KDbCursor.h
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 71 | public: | |||
---|---|---|---|---|---|
72 | //! Options that describe behavior of database cursor | 72 | //! Options that describe behavior of database cursor | ||
73 | enum class Option { | 73 | enum class Option { | ||
74 | None = 0, | 74 | None = 0, | ||
75 | Buffered = 1 | 75 | Buffered = 1 | ||
76 | }; | 76 | }; | ||
77 | Q_DECLARE_FLAGS(Options, Option) | 77 | Q_DECLARE_FLAGS(Options, Option) | ||
78 | 78 | | |||
79 | /*! @return connection used for the cursor */ | 79 | /*! @return connection used for the cursor */ | ||
80 | KDbConnection* connection() const; | 80 | KDbConnection* connection(); | ||
81 | | ||||
82 | //! @overload | ||||
83 | //! @since 3.1 | ||||
84 | const KDbConnection* connection() const; | ||||
81 | 85 | | |||
82 | /*! Opens the cursor using data provided on creation. | 86 | /*! Opens the cursor using data provided on creation. | ||
83 | The data might be either KDbQuerySchema or a raw SQL statement. */ | 87 | The data might be either KDbQuerySchema or a raw SQL statement. */ | ||
84 | bool open(); | 88 | bool open(); | ||
85 | 89 | | |||
86 | /*! Closes and then opens again the same cursor. | 90 | /*! Closes and then opens again the same cursor. | ||
87 | If the cursor is not opened it is just opened and result of this open is returned. | 91 | If the cursor is not opened it is just opened and result of this open is returned. | ||
88 | Otherwise, true is returned if cursor is successfully closed and then opened. */ | 92 | Otherwise, true is returned if cursor is successfully closed and then opened. */ | ||
▲ Show 20 Lines • Show All 235 Lines • ▼ Show 20 Line(s) | 326 | private: | |||
324 | 328 | | |||
325 | Q_DISABLE_COPY(KDbCursor) | 329 | Q_DISABLE_COPY(KDbCursor) | ||
326 | friend class CursorDeleter; | 330 | friend class CursorDeleter; | ||
327 | class Private; | 331 | class Private; | ||
328 | Private * const d; | 332 | Private * const d; | ||
329 | }; | 333 | }; | ||
330 | 334 | | |||
331 | //! Sends information about object @a cursor to debug output @a dbg. | 335 | //! Sends information about object @a cursor to debug output @a dbg. | ||
336 | //! @since 3.1 | ||||
337 | KDB_EXPORT QDebug operator<<(QDebug dbg, KDbCursor& cursor); | ||||
338 | | ||||
339 | //! Sends information about object @a cursor to debug output @a dbg. | ||||
332 | KDB_EXPORT QDebug operator<<(QDebug dbg, const KDbCursor& cursor); | 340 | KDB_EXPORT QDebug operator<<(QDebug dbg, const KDbCursor& cursor); | ||
333 | 341 | | |||
334 | Q_DECLARE_OPERATORS_FOR_FLAGS(KDbCursor::Options) | 342 | Q_DECLARE_OPERATORS_FOR_FLAGS(KDbCursor::Options) | ||
335 | 343 | | |||
336 | #endif | 344 | #endif |