Initial commit
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
#ifndef SQLITERESULTSET_H
|
||||
#define SQLITERESULTSET_H
|
||||
|
||||
#include "SQLiteStatement.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
namespace SQLite {
|
||||
|
||||
class SQLiteResultSet
|
||||
{
|
||||
public:
|
||||
SQLiteResultSet(SQLiteStatement& statement);
|
||||
|
||||
public:
|
||||
void AfterLast();
|
||||
void BeforeFirst();
|
||||
bool First();
|
||||
bool IsAfterLast() const;
|
||||
bool IsBeforeFirst() const;
|
||||
bool IsFirst() const;
|
||||
bool IsLast() const;
|
||||
bool Last();
|
||||
bool Next();
|
||||
bool Previous();
|
||||
|
||||
size_t Row() const;
|
||||
size_t RowsCount() const;
|
||||
bool Empty() const;
|
||||
|
||||
uint32_t FindColumn(const std::string& columnName) const;
|
||||
|
||||
long double Double(uint32_t columnIndex) const;
|
||||
long double Double(const std::string& columnLabel) const;
|
||||
int32_t Int(uint32_t columnIndex) const;
|
||||
int32_t Int(const std::string& columnLabel) const;
|
||||
std::string String(uint32_t columnIndex) const;
|
||||
std::string String(const std::string& columnName) const;
|
||||
|
||||
void Print() const;
|
||||
|
||||
private:
|
||||
int Size() const;
|
||||
int LastIndex() const;
|
||||
|
||||
private:
|
||||
std::vector<std::string> m_columns;
|
||||
std::vector<std::vector<std::string>> m_values;
|
||||
int m_currentRow;
|
||||
};
|
||||
|
||||
} // namespace SQLite
|
||||
|
||||
#endif // SQLITERESULTSET_H
|
||||
Reference in New Issue
Block a user