From e3c500938b14c79c3815db90757520a0b58860c0 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 25 Nov 2022 11:04:36 +0100 Subject: [PATCH] Jobs: fix typo, use truncate instead of delete --- Jobs/GraphQL/GraphQLJob.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jobs/GraphQL/GraphQLJob.vb b/Jobs/GraphQL/GraphQLJob.vb index 9d43d135..32570952 100644 --- a/Jobs/GraphQL/GraphQLJob.vb +++ b/Jobs/GraphQL/GraphQLJob.vb @@ -120,7 +120,7 @@ Public Class GraphQLJob ' Clear Table before inserting If pQuery.ClearBeforeFill = True Then - If DeleteWithQueryName(pQuery) Then + If DeleteWithQueryName(pQuery) = False Then Throw New ApplicationException($"Error while clearing table before fill for Query [{pQuery.Name}]") End If End If @@ -198,7 +198,7 @@ Public Class GraphQLJob End Function Private Function DeleteWithQueryName(pQuery) - Dim oDeleteSQL = $"DELETE FROM {pQuery.DestinationTable}" + Dim oDeleteSQL = $"TRUNCATE TABLE {pQuery.DestinationTable}" Return _MSSQL.ExecuteNonQuery(oDeleteSQL) End Function