Skip to content

Commit 6dcdc41

Browse files
committed
Merge branch 'release/0.35'
Conflicts: README.md
2 parents 8c427d0 + 4d50592 commit 6dcdc41

300 files changed

Lines changed: 21125 additions & 14927 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.appveyor.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
os: Visual Studio 2015
2+
3+
platform:
4+
- x64
5+
6+
configuration:
7+
- Debug
8+
- Release
9+
10+
matrix:
11+
fast_finish: true
12+
13+
build_script:
14+
- CD
15+
- cd ..
16+
- CD
17+
- git clone https://github.com/HowardHinnant/date
18+
- cd sqlpp11
19+
- CD
20+
- echo %configuration%
21+
- mkdir build
22+
- cd build
23+
- cmake --version
24+
- cmake .. -DCMAKE_CXX_FLAGS="/EHsc /wd4503"
25+
- cmake --build . --config %configuration%
26+
- ctest . --build-config %configuration%
27+

‎.clang-format‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BreakBeforeBinaryOperators: false
1414
BreakBeforeTernaryOperators: true
1515
BreakConstructorInitializersBeforeComma: false
1616
BinPackParameters: false
17-
ColumnLimit: 160
17+
ColumnLimit: 120
1818
ConstructorInitializerAllOnOneLineOrOnePerLine: true
1919
DerivePointerAlignment: false
2020
ExperimentalAutoDetectBinPacking: false

‎.travis.yml‎

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,54 @@ language: cpp
22

33
os:
44
- linux
5+
- osx
6+
7+
osx_image: xcode7
58

69
compiler:
7-
# - clang # disabled clang due to missing libc++
10+
- clang
811
- gcc
912

13+
env:
14+
- CONFIG=Release
15+
- CONFIG=Debug
16+
1017
notifications:
1118
email:
1219
on_success: change
1320
on_failure: always
1421

15-
before_install:
16-
# install boost 1.50 (headers only), travis currently offers 1.46 and 1.48
17-
- wget http://sourceforge.net/projects/boost/files/boost/1.50.0/boost_1_50_0.tar.bz2/download -O /tmp/boost.tar.bz2
18-
- mkdir -p temp
19-
- cd temp
20-
- tar jxf /tmp/boost.tar.bz2 boost_1_50_0/boost # extract headers only
21-
- sudo mkdir -p /usr/local/include/
22-
- sudo ln -s $PWD/boost_1_50_0/boost /usr/local/include
23-
- cd ..
24-
#install g++-4.8
25-
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
26-
- sudo apt-get update
27-
- if [ "$CXX" = "g++" ]; then sudo apt-get install g++-4.8; fi
28-
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
29-
3022
install:
31-
- "mkdir -p $TRAVIS_BUILD_DIR/build/scripts"
32-
- "cd $TRAVIS_BUILD_DIR/build/scripts"
33-
- "cmake $TRAVIS_BUILD_DIR"
23+
- CMAKE_VERSION_MM=3.2
24+
- CMAKE_VERSION_FULL=$CMAKE_VERSION_MM.2
25+
- git clone https://github.com/HowardHinnant/date
26+
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
27+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
28+
&& sudo add-apt-repository -y ppa:apokluda/boost1.53
29+
&& sudo apt-get update -qq
30+
&& sudo apt-get install -qq g++-4.8 libboost1.53-dev --no-install-recommends
31+
&& sudo update-alternatives --quiet --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.6
32+
&& sudo update-alternatives --quiet --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.8
33+
&& sudo update-alternatives --quiet --set gcc /usr/bin/gcc-4.8
34+
&& wget --no-check-certificate http://www.cmake.org/files/v${CMAKE_VERSION_MM}/cmake-${CMAKE_VERSION_FULL}-Linux-x86_64.sh
35+
&& sudo sh cmake-${CMAKE_VERSION_FULL}-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir;
36+
fi
37+
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
38+
brew update
39+
&& ((brew list -1 | grep -q "^$cmake\$") || brew install cmake)
40+
&& (brew outdated cmake || brew upgrade cmake)
41+
&& cmake --version;
42+
fi
43+
44+
before_script:
45+
- mkdir build
46+
- cd build
47+
- if [[ "$CXX" = "g++" && "$CONFIG" = "Debug" && "$TRAVIS_OS_NAME" = "linux" ]]; then export CXXFLAGS="--coverage"; fi
48+
- cmake .. -DCMAKE_BUILD_TYPE=$CONFIG -DDATE_INCLUDE_DIR=$PWD/../date
3449

3550
script:
36-
- "cd $TRAVIS_BUILD_DIR/build/scripts"
37-
- "make -j3"
38-
# test compile-time constraints
39-
- "make test_sqlpp_constraints"
51+
- cmake --build . --config $CONFIG
52+
- ctest --output-on-failure
4053

54+
after_script:
55+
- ../coveralls

‎CMakeLists.txt‎

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Copyright (c) 2013-2015, Roland Bock
22
# All rights reserved.
3-
#
3+
#
44
# Redistribution and use in source and binary forms, with or without modification,
55
# are permitted provided that the following conditions are met:
6-
#
6+
#
77
# Redistributions of source code must retain the above copyright notice, this
88
# list of conditions and the following disclaimer.
9-
#
9+
#
1010
# Redistributions in binary form must reproduce the above copyright notice, this
1111
# list of conditions and the following disclaimer in the documentation and/or
1212
# other materials provided with the distribution.
13-
#
13+
#
1414
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1515
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1616
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -22,26 +22,50 @@
2222
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2323
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2424

25-
cmake_minimum_required(VERSION 2.6)
25+
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
26+
project(sqlpp11 VERSION 0.1 LANGUAGES CXX)
2627

27-
# Cygwin does not define WIN32 and warn if not use with this flag
28-
set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
29-
30-
project (sqlpp11)
3128
enable_testing()
3229

33-
message(STATUS "Using ${CMAKE_CXX_COMPILER} (compiler id: ${CMAKE_CXX_COMPILER_ID})")
34-
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
35-
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall ${CMAKE_CXX_FLAGS}")
36-
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
37-
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall ${CMAKE_CXX_FLAGS}")
30+
add_library(sqlpp11 INTERFACE)
31+
32+
set(DATE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../date" CACHE FILEPATH "Path to Howard Hinnant's date library")
33+
34+
if(NOT EXISTS ${DATE_INCLUDE_DIR}/date.h)
35+
message(SEND_ERROR "Can't find date.h in ${DATE_INCLUDE_DIR}")
36+
endif()
37+
38+
target_include_directories(sqlpp11 INTERFACE
39+
$<BUILD_INTERFACE:${DATE_INCLUDE_DIR}>
40+
$<BUILD_INTERFACE:${sqlpp11_SOURCE_DIR}/include>
41+
)
42+
43+
if (NOT MSVC)
44+
target_compile_features(sqlpp11 INTERFACE
45+
cxx_alias_templates
46+
cxx_auto_type
47+
cxx_constexpr
48+
cxx_decltype
49+
cxx_defaulted_functions
50+
cxx_defaulted_move_initializers
51+
cxx_deleted_functions
52+
cxx_explicit_conversions
53+
cxx_lambdas
54+
cxx_noexcept
55+
cxx_nullptr
56+
cxx_range_for
57+
cxx_right_angle_brackets
58+
cxx_rvalue_references
59+
cxx_static_assert
60+
cxx_trailing_return_types
61+
cxx_uniform_initialization
62+
cxx_template_template_parameters
63+
cxx_variadic_templates
64+
)
3865
endif ()
39-
set(CMAKE_CXX_FLAGS "-Wconversion -Wpedantic -Wshadow ${CMAKE_CXX_FLAGS}")
4066

41-
set(include_dir "${PROJECT_SOURCE_DIR}/include")
42-
file(GLOB_RECURSE sqlpp_headers "${include_dir}/*.h")
43-
include_directories("${include_dir}")
4467
add_subdirectory(tests)
68+
add_subdirectory(test_static_asserts)
4569
add_subdirectory(test_constraints)
4670
add_subdirectory(examples)
4771

‎CREDITS‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ Credits:
33
This library evolved through several stages and would probably not exist without input from other people:
44

55
* Michael Gmelin: Interface and requirements discussions
6-
* Paul Körbitz: Feedback and extensions
7-
* Peter Knoblach: Initial ideas
8-
* Ulrich Küttler: Feedback and extensions
6+
* Paul Körbitz: Feedback and extensions
7+
* Peter Knoblach: Initial ideas
8+
* Ulrich Küttler: Feedback and extensions
9+
* Daniel Pfeifer: Buildsystem, Travis, Coveralls
910

1011

11-
* Metafeed GmbH: Production code using a forerunner version
12-
* PPRO Financial Ltd: Production code using sqlpp11 and a forerunner version
13-
* The boost community: Invaluable suggestions and critiques
12+
* Metafeed GmbH: Production code using a forerunner version
13+
* PPRO Financial Ltd: Production code using sqlpp11 and a forerunner version
14+
* The boost community: Invaluable suggestions and critiques
1415

1516
* Meeting C++ Munich: Hosted the first talk about sqlpp11
1617

‎README.md‎

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
sqlpp11
22
=======
33

4+
Branch / Compiler | clang-3.4, gcc-4.9, Xcode-7 | MSVC 2015 | Test Coverage
5+
------------------| -------------------------------|-------------|---------------
6+
master | [![Build Status](https://travis-ci.org/rbock/sqlpp11.svg?branch=master)](https://travis-ci.org/rbock/sqlpp11?branch=master) | [![Build status](https://ci.appveyor.com/api/projects/status/eid7mwqgavo0h61h/branch/master?svg=true)](https://ci.appveyor.com/project/rbock/sqlpp11/branch/master) | [![Coverage Status](https://coveralls.io/repos/rbock/sqlpp11/badge.svg?branch=master)](https://coveralls.io/r/rbock/sqlpp11?branch=master)
7+
develop | [![Build Status](https://travis-ci.org/rbock/sqlpp11.svg?branch=develop)](https://travis-ci.org/rbock/sqlpp11?branch=develop) | [![Build status](https://ci.appveyor.com/api/projects/status/eid7mwqgavo0h61h/branch/develop?svg=true)](https://ci.appveyor.com/project/rbock/sqlpp11/branch/develop) | [![Coverage Status](https://coveralls.io/repos/rbock/sqlpp11/badge.svg?branch=develop)](https://coveralls.io/r/rbock/sqlpp11?branch=develop)
8+
49
A type safe embedded domain specific language for SQL queries and results in C++
510

6-
Extensive documentation is found in the wiki, https://github.com/rbock/sqlpp11/wiki
11+
Documentation is found in the wiki, https://github.com/rbock/sqlpp11/wiki
12+
13+
Past talks about sqlpp11 and some coding concepts used within the library:
714

8-
Talks/workshops
9-
* MeetingC++ (Berlin, Germany): http://meetingcpp.com/index.php/mcpp2014.html
10-
* 2014-12-05: http://meetingcpp.com/index.php/tv14/items/4.html
11-
* CppCon (Bellevue, Washington, USA): http://cppcon.org
12-
* 2014-09-08: http://sched.co/1qhngYK (Workshop Part 1)
13-
* 2014-09-11: http://sched.co/1r4lue3 (Talk)
14-
* 2014-09-12: http://sched.co/Wi8aWM (Workshop Part 2)
15+
* [CppCast:](http://cppcast.com)
16+
* 2015-05-07: http://cppcast.com/2015/05/roland-bock/
17+
* [CppCon:](http://cppcon.org)
18+
* 2015-09-24: [Pruning Error Messages From Your C++ Template Code](https://www.youtube.com/watch?v=2ISqFW9fRws), with examples from sqlpp11
19+
* 2014-09-11: [sqlpp11, An SQL Library Worthy Of Modern C++](https://www.youtube.com/watch?v=cJPAjhBm-HQ)
20+
* [Meeting C++:](http://meetingcpp.com)
21+
* 2014-12-05: [sqlpp11, An EDSL For Type-Safe SQL In C++11](https://www.youtube.com/watch?v=9Hjfg9IfzhU)
22+
* [MUC++:](http://www.meetup.com/MUCplusplus/)
23+
* 2014-02-27: [Selected C++11 Template Toffees From sqlpp11, Part1](https://www.youtube.com/watch?v=hXnGFYNbmXg), [Part2](https://www.youtube.com/watch?v=WPCV6dvxZ_U), [Part 3](https://www.youtube.com/watch?v=eB7hd_KjTig), [Part 4](https://www.youtube.com/watch?v=NBfqzcN0_EQ)
1524

16-
17-
You can contact me
25+
You can contact me
1826
* by posting issues at https://github.com/rbock/sqlpp11/issues
1927
* or via email at rbock at eudoxos dot de
2028

@@ -40,7 +48,7 @@ sqlpp11 is vendor-neutral. Specific traits of databases (e.g. unsupported or non
4048

4149
Examples:
4250
---------
43-
For the examples, lets assume you have a table class representing something like
51+
For the examples, lets assume you have a table class representing something like
4452

4553
```SQL
4654
CREATE TABLE foo (
@@ -104,19 +112,23 @@ Requirements:
104112
__Compiler:__
105113
sqlpp11 makes heavy use of C++11 and requires a recent compiler and STL. The following compilers are known to compile the test programs:
106114
107-
* clang-3.2 on Ubuntu-12.4
108-
* clang-3.4 on Ubuntu-12.4
109-
* g++-4.8 on Ubuntu-12.4
110-
* g++-4.8 on cygwin 64bit
111-
* g++-4.9 on Debian Unstable
115+
* clang-3.4+ on Ubuntu-12.4
116+
* g++-4.8+ on Ubuntu-12.4
117+
* g++-4.8+ on cygwin 64bit
118+
* g++-4.9+ on Debian Unstable
119+
* Xcode-7 on OS X
120+
* MSVC 2015 Update 1 on Windows Server 2012
112121
113122
__Database Connector:__
114123
sqlpp11 requires a certain api in order to connect with the database, see database/api.h.
115124
116125
* MySQL: https://github.com/rbock/sqlpp11-connector-mysql
117126
* Sqlite3: https://github.com/rbock/sqlpp11-connector-sqlite3
118127
* PostgreSQL: https://github.com/matthijs/sqlpp11-connector-postgresql
119-
128+
129+
__Date Library:__
130+
sqlpp11 requires [Howard Hinnant's date library](https://github.com/HowardHinnant/date) for `date` and `date_time` data types.
131+
120132
To demonstrate that sqlpp11 can work with other backends as well, here is an experimental backend for structs in standard containers:
121133
122134
* STL Container: https://github.com/rbock/sqlpp11-connector-stl

0 commit comments

Comments
 (0)