From 24ca3b2217e4c4ee937ec44ea7ec18741d3b4d31 Mon Sep 17 00:00:00 2001 From: Aaron Bishop Date: Mon, 2 May 2016 08:08:34 -0400 Subject: [PATCH 1/6] added common SQL data types like binary and bit --- include/sqlpp11/data_types/boolean/data_type.h | 2 ++ include/sqlpp11/data_types/day_point/data_type.h | 2 ++ include/sqlpp11/data_types/text/data_type.h | 2 ++ include/sqlpp11/data_types/time_point/data_type.h | 4 ++++ 4 files changed, 10 insertions(+) diff --git a/include/sqlpp11/data_types/boolean/data_type.h b/include/sqlpp11/data_types/boolean/data_type.h index 66528c63..7589d829 100644 --- a/include/sqlpp11/data_types/boolean/data_type.h +++ b/include/sqlpp11/data_types/boolean/data_type.h @@ -39,6 +39,8 @@ namespace sqlpp template using _is_valid_operand = is_boolean_t; }; + + using bit = sqlpp::boolean; } #endif diff --git a/include/sqlpp11/data_types/day_point/data_type.h b/include/sqlpp11/data_types/day_point/data_type.h index a589e752..9be108a0 100644 --- a/include/sqlpp11/data_types/day_point/data_type.h +++ b/include/sqlpp11/data_types/day_point/data_type.h @@ -42,5 +42,7 @@ namespace sqlpp template using _is_valid_assignment_operand = is_day_point_t; }; + + using date = day_point; } #endif diff --git a/include/sqlpp11/data_types/text/data_type.h b/include/sqlpp11/data_types/text/data_type.h index 7b90b5e0..6215dacb 100644 --- a/include/sqlpp11/data_types/text/data_type.h +++ b/include/sqlpp11/data_types/text/data_type.h @@ -43,5 +43,7 @@ namespace sqlpp using blob = text; using varchar = text; using char_ = text; + using binary = text; + using varbinary = text; } #endif diff --git a/include/sqlpp11/data_types/time_point/data_type.h b/include/sqlpp11/data_types/time_point/data_type.h index ad3f727e..41bc7eca 100644 --- a/include/sqlpp11/data_types/time_point/data_type.h +++ b/include/sqlpp11/data_types/time_point/data_type.h @@ -40,5 +40,9 @@ namespace sqlpp template using _is_valid_operand = is_day_or_time_point_t; }; + + using datetime = time_point; + using timestamp = time_point; + using time = time_point; } #endif From 58256e2b797f08c35b6fa323b384c1fe652e6cbf Mon Sep 17 00:00:00 2001 From: Aaron Bishop Date: Fri, 20 May 2016 07:28:08 -0400 Subject: [PATCH 2/6] removed time in favor of feature/time_of_day --- include/sqlpp11/data_types/time_point/data_type.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/sqlpp11/data_types/time_point/data_type.h b/include/sqlpp11/data_types/time_point/data_type.h index 41bc7eca..374520dc 100644 --- a/include/sqlpp11/data_types/time_point/data_type.h +++ b/include/sqlpp11/data_types/time_point/data_type.h @@ -43,6 +43,5 @@ namespace sqlpp using datetime = time_point; using timestamp = time_point; - using time = time_point; } #endif From fe5f2ef2ef046606e52280c63148c392c0f5565e Mon Sep 17 00:00:00 2001 From: Aaron Bishop Date: Tue, 7 Jun 2016 20:43:22 -0400 Subject: [PATCH 3/6] removed datetime and timestamp --- include/sqlpp11/data_types/time_point/data_type.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/sqlpp11/data_types/time_point/data_type.h b/include/sqlpp11/data_types/time_point/data_type.h index 374520dc..ad3f727e 100644 --- a/include/sqlpp11/data_types/time_point/data_type.h +++ b/include/sqlpp11/data_types/time_point/data_type.h @@ -40,8 +40,5 @@ namespace sqlpp template using _is_valid_operand = is_day_or_time_point_t; }; - - using datetime = time_point; - using timestamp = time_point; } #endif From 0748c69252138504f641b58014ea2b8ab5eb9b6a Mon Sep 17 00:00:00 2001 From: strangeqargo <“strangeqargo@gmail.com”> Date: Thu, 9 Jun 2016 21:15:41 +0300 Subject: [PATCH 4/6] test view --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bf637473..d803bc7d 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,11 @@ To demonstrate that sqlpp11 can work with other backends as well, here is an exp * STL Container: https://github.com/rbock/sqlpp11-connector-stl __Date Library:__ -sqlpp11 requires [Howard Hinnant's date library](https://github.com/HowardHinnant/date) for `date` and `date_time` data types. +sqlpp11 requires [Howard Hinnant's date library](https://github.com/HowardHinnant/date) for `date` and `date_time` data types. Sqlpp11 includes CMake module for finding it, if you didn't install this library system-wide, you should modify CMakeFiles.txt or add this flags to compile sqlpp11: + +``` +cmake -DHinnantDate_ROOT_DIR=/%PATH_TO_HinnantDate_SOURCE%/ -DHinnantDate_INCLUDE_DIR=/%PATH_TO_HinnantDate_SOURCE%/ +``` Basic usage: ------------- From c0faa53a6fa8c3bb5b73cabc072e4e91517396ba Mon Sep 17 00:00:00 2001 From: strangeqargo <“strangeqargo@gmail.com”> Date: Thu, 9 Jun 2016 21:17:53 +0300 Subject: [PATCH 5/6] done --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d803bc7d..3be54c2f 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ To demonstrate that sqlpp11 can work with other backends as well, here is an exp * STL Container: https://github.com/rbock/sqlpp11-connector-stl __Date Library:__ -sqlpp11 requires [Howard Hinnant's date library](https://github.com/HowardHinnant/date) for `date` and `date_time` data types. Sqlpp11 includes CMake module for finding it, if you didn't install this library system-wide, you should modify CMakeFiles.txt or add this flags to compile sqlpp11: +sqlpp11 requires [Howard Hinnant's date library](https://github.com/HowardHinnant/date) for `date` and `date_time` data types. Sqlpp11 includes CMake search module for this, but if you didn't install this library system-wide, you should modify CMakeLists.txt or add this flags to compile sqlpp11: ``` cmake -DHinnantDate_ROOT_DIR=/%PATH_TO_HinnantDate_SOURCE%/ -DHinnantDate_INCLUDE_DIR=/%PATH_TO_HinnantDate_SOURCE%/ From aa54f665b1928b882e819b91e04e1441fcbb916e Mon Sep 17 00:00:00 2001 From: strangeqargo <“strangeqargo@gmail.com”> Date: Thu, 9 Jun 2016 21:18:24 +0300 Subject: [PATCH 6/6] fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3be54c2f..4d1c69c8 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ To demonstrate that sqlpp11 can work with other backends as well, here is an exp * STL Container: https://github.com/rbock/sqlpp11-connector-stl __Date Library:__ -sqlpp11 requires [Howard Hinnant's date library](https://github.com/HowardHinnant/date) for `date` and `date_time` data types. Sqlpp11 includes CMake search module for this, but if you didn't install this library system-wide, you should modify CMakeLists.txt or add this flags to compile sqlpp11: +sqlpp11 requires [Howard Hinnant's date library](https://github.com/HowardHinnant/date) for `date` and `date_time` data types. Sqlpp11 includes CMake search module for this, but if you didn't install this library system-wide, you should modify CMakeLists.txt or add some flags to compile sqlpp11: ``` cmake -DHinnantDate_ROOT_DIR=/%PATH_TO_HinnantDate_SOURCE%/ -DHinnantDate_INCLUDE_DIR=/%PATH_TO_HinnantDate_SOURCE%/