Skip to content

Commit

Permalink
Added bigNumber type field
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-kg committed Jun 1, 2020
1 parent 5b5998d commit 318c2a8
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src.wsjcpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Automaticly generated by wsjcpp@v0.0.1
# Automaticly generated by wsjcpp@v0.1.5
cmake_minimum_required(VERSION 3.0)

add_definitions(-DWSJCPP_VERSION="v0.0.1")
add_definitions(-DWSJCPP_NAME="wsjcpp-storages")
add_definitions(-DWSJCPP_APP_VERSION="v0.1.3")
add_definitions(-DWSJCPP_APP_NAME="wsjcpp-storages")

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MACOSX TRUE)
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

int main(int argc, const char* argv[]) {
std::string TAG = "MAIN";
std::string appName = std::string(WSJCPP_NAME);
std::string appVersion = std::string(WSJCPP_VERSION);
std::string appName = std::string(WSJCPP_APP_NAME);
std::string appVersion = std::string(WSJCPP_APP_VERSION);
if (!WsjcppCore::dirExists(".wsjcpp")) {
WsjcppCore::makeDir(".wsjcpp");
}
Expand Down
11 changes: 11 additions & 0 deletions src/wsjcpp_storages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ WsjcppStorageColumnDef &WsjcppStorageColumnDef::number() {

// ---------------------------------------------------------------------

WsjcppStorageColumnDef &WsjcppStorageColumnDef::bigNumber() {
if (m_sType != "") {
WsjcppLog::throw_err(TAG, "Datatype already defined: " + m_sType);
return *this;
}
m_sType = "bigNumber";
return *this;
}

// ---------------------------------------------------------------------

WsjcppStorageColumnDef &WsjcppStorageColumnDef::doubleNumber() {
if (m_sType != "") {
WsjcppLog::throw_err(TAG, "Datatype already defined: " + m_sType);
Expand Down
1 change: 1 addition & 0 deletions src/wsjcpp_storages.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class WsjcppStorageColumnDef {
WsjcppStorageColumnDef &text();
WsjcppStorageColumnDef &datetime();
WsjcppStorageColumnDef &number();
WsjcppStorageColumnDef &bigNumber();
WsjcppStorageColumnDef &doubleNumber();
WsjcppStorageColumnDef &primaryKey();
WsjcppStorageColumnDef &defaultValue(const std::string& sDefault);
Expand Down
8 changes: 4 additions & 4 deletions unit-tests.wsjcpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Automaticly generated by wsjcpp@v0.0.1
# Automaticly generated by wsjcpp@v0.1.5
cmake_minimum_required(VERSION 3.0)

project(unit-tests C CXX)
add_definitions(-DWSJCPP_VERSION="ut-v0.0.1")
add_definitions(-DWSJCPP_NAME="unit-tests-wsjcpp-storages")
add_definitions(-DWSJCPP_APP_VERSION="ut-v0.1.3")
add_definitions(-DWSJCPP_APP_NAME="unit-tests-wsjcpp-storages")

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MACOSX TRUE)
Expand All @@ -29,7 +29,7 @@ list (APPEND WSJCPP_SOURCES "../src.wsjcpp/wsjcpp_core/wsjcpp_unit_tests_main.cp
list (APPEND WSJCPP_SOURCES "../src.wsjcpp/wsjcpp_core/wsjcpp_resources_manager.h")
list (APPEND WSJCPP_SOURCES "../src.wsjcpp/wsjcpp_core/wsjcpp_resources_manager.cpp")

# wsjcpp-storages:v0.0.1
# wsjcpp-storages:v0.1.3
list (APPEND WSJCPP_INCLUDE_DIRS "../src")
list (APPEND WSJCPP_SOURCES "../src/wsjcpp_storages.cpp")
list (APPEND WSJCPP_SOURCES "../src/wsjcpp_storages.h")
Expand Down
2 changes: 1 addition & 1 deletion wsjcpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ wsjcpp_version: v0.0.1
cmake_minimum_required: 3.0
cmake_cxx_standard: 11
name: wsjcpp-storages
version: v0.1.2
version: v0.1.3
description: Abstraction Model for work with different databases
issues: https://github.com/wsjcpp/wsjcpp-storages/issues
keywords:
Expand Down

0 comments on commit 318c2a8

Please sign in to comment.