Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
biboumi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
88
Issues
88
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
louiz’
biboumi
Commits
fd9c7139
Commit
fd9c7139
authored
Feb 11, 2018
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a few warnings
parent
d7055414
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
3 deletions
+13
-3
src/database/column.hpp
src/database/column.hpp
+1
-1
src/database/insert_query.hpp
src/database/insert_query.hpp
+1
-1
src/database/query.cpp
src/database/query.cpp
+9
-0
src/database/query.hpp
src/database/query.hpp
+2
-0
src/database/sqlite3_statement.hpp
src/database/sqlite3_statement.hpp
+0
-1
No files found.
src/database/column.hpp
View file @
fd9c7139
...
...
@@ -18,5 +18,5 @@ struct Id: Column<std::size_t> {
static
constexpr
auto
name
=
"id_"
;
static
constexpr
auto
options
=
"PRIMARY KEY"
;
Id
()
:
Column
<
std
::
size_t
>
(
-
1
)
{}
Id
()
:
Column
<
std
::
size_t
>
(
unset_value
)
{}
};
src/database/insert_query.hpp
View file @
fd9c7139
...
...
@@ -22,7 +22,7 @@ update_autoincrement_id(std::tuple<T...>& columns, Statement& statement)
template
<
std
::
size_t
N
=
0
,
typename
...
T
>
typename
std
::
enable_if
<
N
==
sizeof
...(
T
),
void
>::
type
update_autoincrement_id
(
std
::
tuple
<
T
...
>&
,
Statement
&
statement
)
update_autoincrement_id
(
std
::
tuple
<
T
...
>&
,
Statement
&
)
{}
struct
InsertQuery
:
public
Query
...
...
src/database/query.cpp
View file @
fd9c7139
...
...
@@ -21,6 +21,15 @@ void actual_bind(Statement& statement, const OptionalBool& value, int index)
statement
.
bind_int64
(
index
,
-
1
);
}
void
actual_bind
(
Statement
&
statement
,
const
std
::
size_t
value
,
int
index
)
{
actual_bind
(
statement
,
static_cast
<
std
::
int64_t
>
(
value
),
index
);
}
void
actual_bind
(
Statement
&
statement
,
const
int
value
,
int
index
)
{
actual_bind
(
statement
,
static_cast
<
std
::
int64_t
>
(
value
),
index
);
}
void
actual_add_param
(
Query
&
query
,
const
std
::
string
&
val
)
{
...
...
src/database/query.hpp
View file @
fd9c7139
...
...
@@ -13,6 +13,8 @@
void
actual_bind
(
Statement
&
statement
,
const
std
::
string
&
value
,
int
index
);
void
actual_bind
(
Statement
&
statement
,
const
std
::
int64_t
value
,
int
index
);
void
actual_bind
(
Statement
&
statement
,
const
std
::
size_t
value
,
int
index
);
void
actual_bind
(
Statement
&
statement
,
const
int
value
,
int
index
);
void
actual_bind
(
Statement
&
statement
,
const
OptionalBool
&
value
,
int
index
);
#ifdef DEBUG_SQL_QUERIES
...
...
src/database/sqlite3_statement.hpp
View file @
fd9c7139
...
...
@@ -88,5 +88,4 @@ class Sqlite3Statement: public Statement
private:
sqlite3_stmt
*
stmt
;
int
last_step_result
{
SQLITE_OK
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment