[geary/wip/misc-cleanup: 3/4] Remove Db.Statement.raw private field
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/misc-cleanup: 3/4] Remove Db.Statement.raw private field
- Date: Tue, 6 Aug 2019 11:42:55 +0000 (UTC)
commit 6646328d6ea46ec45584072f1d49718445aa9eab
Author: Michael Gratton <mike vee net>
Date: Tue Aug 6 21:38:52 2019 +1000
Remove Db.Statement.raw private field
This can never get used, so just remove it.
src/engine/db/db-statement.vala | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/src/engine/db/db-statement.vala b/src/engine/db/db-statement.vala
index 214cdf6c..8c0fe8b5 100644
--- a/src/engine/db/db-statement.vala
+++ b/src/engine/db/db-statement.vala
@@ -5,10 +5,10 @@
*/
public class Geary.Db.Statement : Geary.Db.Context {
- private unowned string? raw;
- public unowned string sql { get {
- return !String.is_empty(raw) ? raw : stmt.sql();
- } }
+
+ public string sql {
+ get { return this.stmt.sql(); }
+ }
public Connection connection { get; private set; }
@@ -35,13 +35,9 @@ public class Geary.Db.Statement : Geary.Db.Context {
internal Statement(Connection connection, string sql) throws DatabaseError {
this.connection = connection;
- // save for logging in case prepare_v2() fails
- raw = sql;
-
throw_on_error("Statement.ctor", connection.db.prepare_v2(sql, -1, out stmt, null), sql);
+ }
- // not needed any longer
- raw = null;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]