Mercurial > hg > orthanc-databases
comparison Framework/PostgreSQL/PostgreSQLStatement.cpp @ 522:c49136b34891 large-queries tip
use a prepared statement for InsertOrUpdateMetadata
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Fri, 05 Jul 2024 09:15:54 +0200 |
parents | 54d518dcd74a |
children |
comparison
equal
deleted
inserted
replaced
521:2ab3d45c0b3c | 522:c49136b34891 |
---|---|
24 #include "PostgreSQLIncludes.h" // Must be the first | 24 #include "PostgreSQLIncludes.h" // Must be the first |
25 #include "PostgreSQLStatement.h" | 25 #include "PostgreSQLStatement.h" |
26 | 26 |
27 #include "../Common/BinaryStringValue.h" | 27 #include "../Common/BinaryStringValue.h" |
28 #include "../Common/InputFileValue.h" | 28 #include "../Common/InputFileValue.h" |
29 #include "../Common/Integer32Value.h" | |
29 #include "../Common/Integer64Value.h" | 30 #include "../Common/Integer64Value.h" |
30 #include "../Common/NullValue.h" | 31 #include "../Common/NullValue.h" |
31 #include "../Common/ResultBase.h" | 32 #include "../Common/ResultBase.h" |
32 #include "../Common/Utf8StringValue.h" | 33 #include "../Common/Utf8StringValue.h" |
33 #include "PostgreSQLResult.h" | 34 #include "PostgreSQLResult.h" |
336 { | 337 { |
337 case ValueType_Integer64: | 338 case ValueType_Integer64: |
338 DeclareInputInteger64(i); | 339 DeclareInputInteger64(i); |
339 break; | 340 break; |
340 | 341 |
342 case ValueType_Integer32: | |
343 DeclareInputInteger(i); | |
344 break; | |
345 | |
341 case ValueType_Utf8String: | 346 case ValueType_Utf8String: |
342 DeclareInputString(i); | 347 DeclareInputString(i); |
343 break; | 348 break; |
344 | 349 |
345 case ValueType_BinaryString: | 350 case ValueType_BinaryString: |
527 { | 532 { |
528 case ValueType_Integer64: | 533 case ValueType_Integer64: |
529 BindInteger64(i, dynamic_cast<const Integer64Value&>(parameters.GetValue(name)).GetValue()); | 534 BindInteger64(i, dynamic_cast<const Integer64Value&>(parameters.GetValue(name)).GetValue()); |
530 break; | 535 break; |
531 | 536 |
537 case ValueType_Integer32: | |
538 BindInteger(i, dynamic_cast<const Integer32Value&>(parameters.GetValue(name)).GetValue()); | |
539 break; | |
540 | |
532 case ValueType_Null: | 541 case ValueType_Null: |
533 BindNull(i); | 542 BindNull(i); |
534 break; | 543 break; |
535 | 544 |
536 case ValueType_Utf8String: | 545 case ValueType_Utf8String: |