Skip to content

Commit 09f23ce

Browse files
committed
Reformatted using clang-format
Please use clang-format before submitting code, e.g via the pre-commit supplied in the repo (thanks AndiDog)
1 parent 46c565c commit 09f23ce

File tree

168 files changed

+13489
-13088
lines changed

Some content is hidden

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

168 files changed

+13489
-13088
lines changed

.clang-format

+1-1
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

connector_api/bind_result.h

+55-57
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/*
22
* Copyright (c) 2013-2015, Roland Bock
33
* All rights reserved.
4-
*
4+
*
55
* Redistribution and use in source and binary forms, with or without modification,
66
* are permitted provided that the following conditions are met:
7-
*
7+
*
88
* Redistributions of source code must retain the above copyright notice, this
99
* list of conditions and the following disclaimer.
10-
*
10+
*
1111
* Redistributions in binary form must reproduce the above copyright notice, this
1212
* list of conditions and the following disclaimer in the documentation and/or
1313
* other materials provided with the distribution.
14-
*
14+
*
1515
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1616
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1717
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,70 +24,68 @@
2424
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525
*/
2626

27-
2827
#ifndef SQLPP_DATABASE_BIND_RESULT_H
2928
#define SQLPP_DATABASE_BIND_RESULT_H
3029

3130
#include <memory>
3231

3332
namespace sqlpp
3433
{
35-
namespace database
36-
{
37-
/*
38-
* bind_result_t binds values of a sqlpp11 result row
39-
* to the results of a statement
40-
*/
41-
class bind_result_t
42-
{
43-
public:
44-
bind_result_t(); // default constructor for a result that will not yield a valid row
45-
bind_result_t(...);
46-
bind_result_t(const bind_result_t&) = delete;
47-
bind_result_t(bind_result_t&& rhs);
48-
bind_result_t& operator=(const bind_result_t&) = delete;
49-
bind_result_t& operator=(bind_result_t&&);
50-
~bind_result_t();
51-
52-
bool operator==(const bind_result_t& rhs) const;
34+
namespace database
35+
{
36+
/*
37+
* bind_result_t binds values of a sqlpp11 result row
38+
* to the results of a statement
39+
*/
40+
class bind_result_t
41+
{
42+
public:
43+
bind_result_t(); // default constructor for a result that will not yield a valid row
44+
bind_result_t(...);
45+
bind_result_t(const bind_result_t&) = delete;
46+
bind_result_t(bind_result_t&& rhs);
47+
bind_result_t& operator=(const bind_result_t&) = delete;
48+
bind_result_t& operator=(bind_result_t&&);
49+
~bind_result_t();
5350

54-
template<typename ResultRow>
55-
void next(ResultRow& result_row);
51+
bool operator==(const bind_result_t& rhs) const;
5652

57-
// something similar to this:
58-
/*
59-
{
60-
if (!_handle)
61-
{
62-
result_row.invalidate();
63-
return;
64-
}
53+
template <typename ResultRow>
54+
void next(ResultRow& result_row);
6555

66-
if (next_impl())
67-
{
68-
if (not result_row)
69-
{
70-
result_row.validate();
71-
}
72-
result_row._bind(*this); // bind result row values to results
73-
}
74-
else
75-
{
76-
if (result_row)
77-
result_row.invalidate();
78-
}
79-
};
80-
*/
56+
// something similar to this:
57+
/*
58+
{
59+
if (!_handle)
60+
{
61+
result_row.invalidate();
62+
return;
63+
}
8164
82-
// These are called by the result row to bind individual result values
83-
// More will be added over time
84-
void _bind_boolean_result(size_t index, signed char* value, bool* is_null);
85-
void _bind_floating_point_result(size_t index, double* value, bool* is_null);
86-
void _bind_integral_result(size_t index, int64_t* value, bool* is_null);
87-
void _bind_text_result(size_t index, const char** text, size_t* len);
88-
...
89-
};
65+
if (next_impl())
66+
{
67+
if (not result_row)
68+
{
69+
result_row.validate();
70+
}
71+
result_row._bind(*this); // bind result row values to results
72+
}
73+
else
74+
{
75+
if (result_row)
76+
result_row.invalidate();
77+
}
78+
};
79+
*/
9080

91-
}
81+
// These are called by the result row to bind individual result values
82+
// More will be added over time
83+
void _bind_boolean_result(size_t index, signed char* value, bool* is_null);
84+
void _bind_floating_point_result(size_t index, double* value, bool* is_null);
85+
void _bind_integral_result(size_t index, int64_t* value, bool* is_null);
86+
void _bind_text_result(size_t index, const char** text, size_t* len);
87+
...
88+
};
89+
}
9290
}
9391
#endif

0 commit comments

Comments
 (0)