Change-Id: I23b3dc715cfb760cd1c84364aae8d2132d7f853a
{
return try_catch<bool>([&] {
auto &command = getQuery(QueryType::EPkgIdExists);
{
return try_catch<bool>([&] {
auto &command = getQuery(QueryType::EPkgIdExists);
- command->BindString(1, pkgId.c_str());
+ command->BindString(1, pkgId);
return command->Step();
});
}
return command->Step();
});
}
{
return try_catch<bool>([&] {
auto &command = getQuery(QueryType::EGetPkgId);
{
return try_catch<bool>([&] {
auto &command = getQuery(QueryType::EGetPkgId);
- command->BindString(1, appId.c_str());
+ command->BindString(1, appId);
if (!command->Step()) {
// No application with such appId
if (!command->Step()) {
// No application with such appId
{
try_catch<void>([&] {
auto &command = getQuery(QueryType::EAddApplication);
{
try_catch<void>([&] {
auto &command = getQuery(QueryType::EAddApplication);
- command->BindString(1, appId.c_str());
- command->BindString(2, pkgId.c_str());
+ command->BindString(1, appId);
+ command->BindString(2, pkgId);
command->BindInteger(3, static_cast<unsigned int>(uid));
if (command->Step()) {
command->BindInteger(3, static_cast<unsigned int>(uid));
if (command->Step()) {
}
auto &command = getQuery(QueryType::ERemoveApplication);
}
auto &command = getQuery(QueryType::ERemoveApplication);
- command->BindString(1, appId.c_str());
+ command->BindString(1, appId);
command->BindInteger(2, static_cast<unsigned int>(uid));
if (command->Step()) {
command->BindInteger(2, static_cast<unsigned int>(uid));
if (command->Step()) {
{
try_catch<void>([&] {
auto &command = getQuery(QueryType::EGetPkgPrivileges);
{
try_catch<void>([&] {
auto &command = getQuery(QueryType::EGetPkgPrivileges);
- command->BindString(1, pkgId.c_str());
+ command->BindString(1, pkgId);
command->BindInteger(2, static_cast<unsigned int>(uid));
while (command->Step()) {
command->BindInteger(2, static_cast<unsigned int>(uid));
while (command->Step()) {
m_commands.at(static_cast<size_t>(QueryType::EGetAppPrivileges));
command->Reset();
m_commands.at(static_cast<size_t>(QueryType::EGetAppPrivileges));
command->Reset();
- command->BindString(1, appId.c_str());
+ command->BindString(1, appId);
command->BindInteger(2, static_cast<unsigned int>(uid));
currentPrivileges.clear();
command->BindInteger(2, static_cast<unsigned int>(uid));
currentPrivileges.clear();
{
try_catch<void>([&] {
auto &command = getQuery(QueryType::ERemoveAppPrivileges);
{
try_catch<void>([&] {
auto &command = getQuery(QueryType::ERemoveAppPrivileges);
- command->BindString(1, appId.c_str());
+ command->BindString(1, appId);
command->BindInteger(2, static_cast<unsigned int>(uid));
if (command->Step()) {
LogDebug("Unexpected SQLITE_ROW answer to query: " <<
command->BindInteger(2, static_cast<unsigned int>(uid));
if (command->Step()) {
LogDebug("Unexpected SQLITE_ROW answer to query: " <<
{
try_catch<void>([&] {
auto &command = getQuery(QueryType::EAddAppPrivileges);
{
try_catch<void>([&] {
auto &command = getQuery(QueryType::EAddAppPrivileges);
- command->BindString(1, appId.c_str());
+ command->BindString(1, appId);
command->BindInteger(2, static_cast<unsigned int>(uid));
RemoveAppPrivileges(appId, uid);
for (const auto &privilege : privileges) {
command->BindInteger(2, static_cast<unsigned int>(uid));
RemoveAppPrivileges(appId, uid);
for (const auto &privilege : privileges) {
- command->BindString(3, privilege.c_str());
+ command->BindString(3, privilege);
command->Step();
command->Reset();
LogDebug("Added privilege: " << privilege << " to appId: " << appId);
command->Step();
command->Reset();
LogDebug("Added privilege: " << privilege << " to appId: " << appId);
{
try_catch<void>([&] {
auto &command = getQuery(QueryType::EGetPrivilegeGroups);
{
try_catch<void>([&] {
auto &command = getQuery(QueryType::EGetPrivilegeGroups);
- command->BindString(1, privilege.c_str());
+ command->BindString(1, privilege);
while (command->Step()) {
std::string groupName = command->GetColumnString(0);
while (command->Step()) {
std::string groupName = command->GetColumnString(0);
m_commands.at(static_cast<size_t>(QueryType::EGetAppsInPkg));
command->Reset();
m_commands.at(static_cast<size_t>(QueryType::EGetAppsInPkg));
command->Reset();
- command->BindString(1, pkgId.c_str());
+ command->BindString(1, pkgId);
appIds.clear();
while (command->Step()) {
appIds.clear();
while (command->Step()) {