From 888657db9a5d0e27bbcd33af2967c6968510e4e4 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Thu, 31 Aug 2023 10:15:53 +0000 Subject: [PATCH] fix ExtractionRecord test --- packages/db/lib/extraction.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/db/lib/extraction.dart b/packages/db/lib/extraction.dart index e66e7b75..1c62c7be 100644 --- a/packages/db/lib/extraction.dart +++ b/packages/db/lib/extraction.dart @@ -5,8 +5,8 @@ import 'package:types/types.dart'; Query insertExtractionQuery(ExtractionRecord extraction) { return Query( 'INSERT INTO extraction_ (ship_symbol, waypoint_symbol, trade_symbol, ' - 'quantity, power, survey_signature, timestamp) VALUES (@shipSymbol, ' - '@waypointSymbol, @tradeSymbol, @quantity, @power, @surveySignature, ' + 'quantity, power, survey_signature, timestamp) VALUES (@ship_symbol, ' + '@waypoint_symbol, @trade_symbol, @quantity, @power, @survey_signature, ' '@timestamp)', substitutionValues: extractionToColumnMap(extraction), ); @@ -15,12 +15,12 @@ Query insertExtractionQuery(ExtractionRecord extraction) { /// Convert an extraction to a column map. Map extractionToColumnMap(ExtractionRecord extraction) { return { - 'shipSymbol': extraction.shipSymbol.toJson(), - 'waypointSymbol': extraction.waypointSymbol.toJson(), - 'tradeSymbol': extraction.tradeSymbol.toJson(), + 'ship_symbol': extraction.shipSymbol.toJson(), + 'waypoint_symbol': extraction.waypointSymbol.toJson(), + 'trade_symbol': extraction.tradeSymbol.toJson(), 'quantity': extraction.quantity, 'power': extraction.power, - 'surveySignature': extraction.surveySignature, + 'survey_signature': extraction.surveySignature, 'timestamp': extraction.timestamp, }; }