aboutsummaryrefslogtreecommitdiff
path: root/mod/database.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'mod/database.cxx')
-rw-r--r--mod/database.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/mod/database.cxx b/mod/database.cxx
index 3a3f793..02d521d 100644
--- a/mod/database.cxx
+++ b/mod/database.cxx
@@ -1,5 +1,4 @@
// file : mod/database.cxx -*- C++ -*-
-// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
#include <mod/database.hxx>
@@ -25,10 +24,10 @@ namespace brep
operator< (const db_key& x, const db_key& y)
{
int r;
- if ((r = x.user.compare (y.user)) != 0 ||
- (r = x.role.compare (y.role)) != 0 ||
+ if ((r = x.user.compare (y.user)) != 0 ||
+ (r = x.role.compare (y.role)) != 0 ||
(r = x.password.compare (y.password)) != 0 ||
- (r = x.name.compare (y.name)) != 0 ||
+ (r = x.name.compare (y.name)) != 0 ||
(r = x.host.compare (y.host)))
return r < 0;
@@ -60,7 +59,7 @@ namespace brep
// Change the connection current user to the execution user name.
//
if (!role_.empty ())
- conn->execute ("SET ROLE '" + role_ + "'");
+ conn->execute ("SET ROLE '" + role_ + '\'');
return conn;
}