Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More code cleanups.

Removed some unused imports and dead code.
  • Loading branch information...
commit c8625e372be7f91d53f90a281323c3fd6232fb0b 1 parent b7ef75d
@mrmonday authored
Showing with 4 additions and 19 deletions.
  1. +0 −1  serenity/persister/Query.d
  2. +4 −18 serenity/persister/backend/Sqlite.d
View
1  serenity/persister/Query.d
@@ -9,7 +9,6 @@
*/
module serenity.persister.Query;
-import std.array;
import std.typetuple;
enum QueryType
View
22 serenity/persister/backend/Sqlite.d
@@ -21,11 +21,9 @@ import std.traits;
import std.typecons;
import std.typetuple;
-import serenity.persister.Query;
-
import serenity.core.Config;
-import serenity.core.Serenity;
-import serenity.core.Util;
+
+import serenity.persister.Query;
// Naive implementation that works at compile time, std.array.replace fails
string replace(string str, string[] replacements...)
@@ -347,17 +345,10 @@ class Sqlite
return SqliteQuery(queryStr, columns);
}
- /*T[] execute(T)(string query)
- {
- import std.stdio;
- writefln("query: %s", query);
- assert(0);
- }*/
-
T[] execute(T, Params...)(SqliteQuery query, Params params)
{
- import std.stdio;
- writeln("query: ", query, "; params: ", params);
+ debug import std.stdio;
+ debug writeln("query: ", query, "; params: ", params);
T[] result;
sqlite3_stmt* statement;
// TODO Deal with tail
@@ -487,11 +478,6 @@ class Sqlite
return result;
}
- /*this(string dbName)
- {
- check(sqlite3_open(toStringz(dbName), &mDb));
- }*/
-
private void check(string file=__FILE__, size_t line=__LINE__)(int errCode)
{
if (errCode != SQLITE_OK)
Please sign in to comment.
Something went wrong with that request. Please try again.