Permalink
Browse files

Fixed bug in Sqlite.initInsert() and Sqlite.initUpdate().

  • Loading branch information...
1 parent bfc7a75 commit 3ba566e15fed8215cc059d706d9ec6f6e567e92e Aaron Craelius committed Mar 27, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 dbi/sqlite/Sqlite.d
View
2 dbi/sqlite/Sqlite.d
@@ -442,11 +442,13 @@ class Sqlite : Database {
void initInsert(char[] tablename, char[][] fields)
{
+ if(writer_ is null) writer_ = new SqlStringWriter;
initQuery(sqlGen.makeInsertSql(writer_,tablename,fields),true);
}
void initUpdate(char[] tablename, char[][] fields, char[] where)
{
+ if(writer_ is null) writer_ = new SqlStringWriter;
initQuery(sqlGen.makeUpdateSql(writer_,tablename,where,fields),true);
}

0 comments on commit 3ba566e

Please sign in to comment.