AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
SQLiteUtils.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_SQLITEUTILS_H_
17 #define ALEXA_CLIENT_SDK_STORAGE_SQLITESTORAGE_INCLUDE_SQLITESTORAGE_SQLITEUTILS_H_
18 
19 #include <string>
20 
21 #include <sqlite3.h>
22 
24 
25 namespace alexaClientSDK {
26 namespace storage {
27 namespace sqliteStorage {
28 
36 sqlite3* createSQLiteDatabase(const std::string& filePath);
37 
45 sqlite3* openSQLiteDatabase(const std::string& filePath);
46 
53 bool closeSQLiteDatabase(sqlite3* dbHandle);
54 
63 bool performQuery(sqlite3* dbHandle, const std::string& sqlString);
64 
73 bool getNumberTableRows(SQLiteDatabase* db, const std::string& tableName, int* numberRows);
74 
85 bool getTableMaxIntValue(SQLiteDatabase* db, const std::string& tableName, const std::string& columnName, int* maxId);
86 
94 bool tableExists(sqlite3* dbHandle, const std::string& tableName);
95 
103 bool clearTable(sqlite3* dbHandle, const std::string& tableName);
104 
114 bool dropTable(sqlite3* dbHandle, const std::string& tableName);
115 
116 } // namespace sqliteStorage
117 } // namespace storage
118 } // namespace alexaClientSDK
119 
120 #endif // ALEXA_CLIENT_SDK_STORAGE_SQLITESTORAGE_INCLUDE_SQLITESTORAGE_SQLITEUTILS_H_
bool getTableMaxIntValue(SQLiteDatabase *db, const std::string &tableName, const std::string &columnName, int *maxId)
bool performQuery(sqlite3 *dbHandle, const std::string &sqlString)
::std::string string
Definition: gtest-port.h:1097
bool tableExists(sqlite3 *dbHandle, const std::string &tableName)
static const std::string tableName
Definition: SmartScreenCaptionStateManagerTest.cpp:30
bool getNumberTableRows(SQLiteDatabase *db, const std::string &tableName, int *numberRows)
sqlite3 * openSQLiteDatabase(const std::string &filePath)
bool clearTable(sqlite3 *dbHandle, const std::string &tableName)
bool dropTable(sqlite3 *dbHandle, const std::string &tableName)
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
bool closeSQLiteDatabase(sqlite3 *dbHandle)
sqlite3 * createSQLiteDatabase(const std::string &filePath)

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