Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-libclient
Commits
3357f53e
Commit
3357f53e
authored
Nov 13, 2019
by
Sébastien Blin
Browse files
database: remove unused method
Change-Id: I66624be31b7cd13c90db88bc5f1059390c18b3f8
parent
5be45ab7
Changes
2
Show whitespace changes
Inline
Side-by-side
src/database.cpp
View file @
3357f53e
...
...
@@ -344,18 +344,6 @@ Database::deleteFrom(const std::string& table, // "t
throw
QueryDeleteError
(
query
,
table
,
where
,
bindsWhere
);
}
void
Database
::
truncateTable
(
const
std
::
string
&
table
)
{
QSqlQuery
query
(
db_
);
auto
prepareStr
=
std
::
string
(
"TRUNCATE TABLE "
+
table
);
query
.
prepare
(
prepareStr
.
c_str
());
if
(
not
query
.
exec
())
throw
QueryTruncateError
(
query
,
table
);
}
Database
::
QueryError
::
QueryError
(
const
QSqlQuery
&
query
)
:
std
::
runtime_error
(
query
.
lastError
().
text
().
toStdString
())
,
query
(
query
)
...
...
src/database.h
View file @
3357f53e
...
...
@@ -217,14 +217,6 @@ public:
void
deleteFrom
(
const
std
::
string
&
table
,
const
std
::
string
&
where
,
const
std
::
map
<
std
::
string
,
std
::
string
>&
bindsWhere
);
/**
* Delete all rows from a table(truncate).
* @param table where to perfom the action on.
* @exception QueryDeleteError delete query failed.
*
* @note usually, identifiers between where and bindsWhere, are equals.
*/
void
truncateTable
(
const
std
::
string
&
table
);
/**
* Select data from table.
* @param select column(s) to select.e
...
...
Write
Preview
Supports
Markdown
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