1 // Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by a apache 2.0 license that can be
3 // found in the LICENSE file.
5 #ifndef SQL_STATEMENT_H_
6 #define SQL_STATEMENT_H_
16 enum class StepResult : int {
22 explicit SQLStatement(SQLConnection* sql_conn) : sql_conn_(sql_conn) {}
23 virtual ~SQLStatement() = default;
25 virtual StepResult Step() = 0;
27 virtual bool BindInt(int pos, int val) = 0;
28 virtual bool BindString(int pos, const std::string& val) = 0;
30 virtual int GetColumnInt(int pos) const = 0;
31 virtual std::string GetColumnString(int pos) const = 0;
33 virtual bool Reset() = 0;
34 virtual void Clear() = 0;
37 SQLConnection* sql_conn_;
42 #endif // SQL_STATEMENT_H_