AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
SQLiteStatement.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_STORAGE_SQLITESTORAGE_INCLUDE_SQLITESTORAGE_SQLITESTATEMENT_H_
17 #define ALEXA_CLIENT_SDK_STORAGE_SQLITESTORAGE_INCLUDE_SQLITESTORAGE_SQLITESTATEMENT_H_
18 
19 #include <list>
20 #include <sqlite3.h>
21 #include <string>
22 
23 namespace alexaClientSDK {
24 namespace storage {
25 namespace sqliteStorage {
26 
38 public:
45  SQLiteStatement(sqlite3* dbHandle, const std::string& sqlString);
46 
51 
57  bool isValid();
58 
65  bool step();
66 
72  bool reset();
73 
82  bool bindIntParameter(int index, int value);
83 
92  bool bindInt64Parameter(int index, int64_t value);
93 
102  bool bindStringParameter(int index, const std::string& value);
103 
109  int getStepResult() const;
110 
116  int getColumnCount() const;
117 
124  std::string getColumnName(int index) const;
125 
141  std::string getColumnText(int index) const;
142 
158  int getColumnInt(int index) const;
159 
175  int64_t getColumnInt64(int index) const;
176 
180  void finalize();
181 
182 private:
184  sqlite3_stmt* m_handle;
185 
187  int m_stepResult;
188 
191  std::list<std::string> m_boundValues;
192 };
193 
194 } // namespace sqliteStorage
195 } // namespace storage
196 } // namespace alexaClientSDK
197 
198 #endif // ALEXA_CLIENT_SDK_STORAGE_SQLITESTORAGE_INCLUDE_SQLITESTORAGE_SQLITESTATEMENT_H_
::std::string string
Definition: gtest-port.h:1097
static int index
Mock buffer index.
Definition: AndroidSLESMediaQueueTest.cpp:70
bool bindStringParameter(int index, const std::string &value)
SQLiteStatement(sqlite3 *dbHandle, const std::string &sqlString)
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0