Skip to content

Commit 26d3d7d

Browse files
committed
Minor
1 parent e7123a8 commit 26d3d7d

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ or include this files:
1818
## How use this
1919

2020
Example main func:
21-
```
21+
```cpp
2222
#include <iostream>
2323
#include <wsjcpp_sql_builder.h>
2424

src.wsjcpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Automaticly generated by wsjcpp@v0.2.5
22
cmake_minimum_required(VERSION 3.0)
33

4-
add_definitions(-DWSJCPP_APP_VERSION="v0.0.1")
4+
add_definitions(-DWSJCPP_APP_VERSION="v0.1.0")
55
add_definitions(-DWSJCPP_APP_NAME="wsjcpp-sql-builder")
66

77
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")

src/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ int main(int argc, const char* argv[]) {
1111
return -1;
1212
}
1313

14+
std::string expectedIns = "INSERT INTO TABLE_NAME(COL1, COL2) VALUES ('val1', 1);";
15+
if (expectedIns != sql.getTextQuery()) {
16+
std::cerr << "Expeceted sql: " << expectedIns << ", but got " << sql.getTextQuery() << std::endl;
17+
return -1;
18+
}
1419
std::cout << sql.getTextQuery() << std::endl;
1520

1621
return 0;

src/wsjcpp_sql_builder.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#pragma once
2727

2828
#include <string>
29+
#include <map>
2930

3031
enum class WsjcppSqlBuilderType { SELECT, INSERT, UPDATE };
3132

@@ -56,6 +57,7 @@ class WsjcppSqlBuilder {
5657
std::string m_sSqlQuery0;
5758
std::string m_sSqlQuery1;
5859
std::string m_sSqlQuery2;
60+
std::map<std::string, std::string> m_mapFields;
5961
};
6062

6163
class WsjcppSqlBuilderSelect : public WsjcppSqlBuilder {

wsjcpp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "wsjcpp-sql-builder"
2-
version: "v0.0.1"
2+
version: v0.1.0
33
cmake_minimum_required: "3.0"
44
cmake_cxx_standard: "17"
55
description: "C++ Class-helper for build SQL queries"

0 commit comments

Comments
 (0)