@@ -786,7 +786,7 @@ func ReadSQLiteDBCols(sdb *sqlite.Conn, dbTable, sortCol, sortDir string, ignore
786
786
// ReadSQLiteDBCSV is a specialised variation of the ReadSQLiteDB() function, just for our CSV exporting code. It may
787
787
// be merged with that in future.
788
788
func ReadSQLiteDBCSV (sdb * sqlite.Conn , dbTable string ) ([][]string , error ) {
789
- // Retrieve all of the data from the selected database table
789
+ // Retrieve all the data from the selected database table
790
790
stmt , err := sdb .Prepare (`SELECT * FROM "` + dbTable + `"` )
791
791
if err != nil {
792
792
log .Printf ("Error when preparing statement for database: %s\n " , err )
@@ -965,18 +965,8 @@ func SQLiteExecuteQueryLive(baseDir, dbOwner, dbName, loggedInUser, query string
965
965
// TODO: Probably add in the before and after logging info at some point (as per query function),
966
966
// so we can analyse query execution times, memory use, etc
967
967
968
- // Prepare the statement
969
- // FIXME: Do we need to do this prepare step? Am suspecting "no", as we don't (yet) have a way to
970
- // batch call the matching stmt.Exec() below. Not remembering what else it might benefit though.
971
- var stmt * sqlite.Stmt
972
- stmt , err = sdb .Prepare (query )
973
- if err != nil {
974
- return
975
- }
976
- defer stmt .Finalize ()
977
-
978
968
// Execute the statement
979
- rowsChanged , err = stmt .ExecDml ()
969
+ rowsChanged , err = sdb .ExecDml (query )
980
970
if err != nil {
981
971
log .Printf ("Error when executing query by '%s' for LIVE database (%s/%s): '%s'\n " ,
982
972
SanitiseLogString (loggedInUser ), SanitiseLogString (dbOwner ), SanitiseLogString (dbName ),
0 commit comments