IResult.h
1/* Copyright (C) 2006-2026 by Tommi Maekitalo
2 Copyright (C) 2006-2026 by Marc Boris Duerner
3 SPDX-License-Identifier: LGPL-2.1-or-later WITH mif-exception
4*/
5
6#ifndef PT_DB_IRESULT_H
7#define PT_DB_IRESULT_H
8
9#include <Pt/Api.h>
10#include <Pt/Types.h>
11#include <Pt/RefCounted.h>
12#include <Pt/Db/Api.h>
13
14
15namespace Pt {
16
17namespace Db {
18
19 class Row;
20
23 class PT_DB_API IResult : public RefCounted
24 {
25 public:
26 typedef std::size_t size_type;
27 typedef Row value_type;
28
29 public:
30 virtual ~IResult()
31 { }
32
35 virtual Row getRow(size_type tup_num) const = 0;
36
39 virtual size_type size() const = 0;
40
43 virtual size_type getFieldCount() const = 0;
44 };
45
46} // namespace Db
47
48} // namespace Pt
49
50#endif // PTV_DB_IRESULT_H
Buffered query-result backend.
Definition IResult.h:24
virtual size_type size() const =0
Returns the number of rows.
virtual size_type getFieldCount() const =0
Returns the number of columns.
virtual Row getRow(size_type tup_num) const =0
Returns the row at tup_num.
One row of a buffered query result.
Definition Row.h:34
Portable SQL database access.
Core module.
Definition Allocator.h:33