1
1
// ***************************************************************************
2
- // Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
2
+ // Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
3
3
// ***************************************************************************
4
4
#include " nodever_cover.h"
5
5
#include " sqlany_utils.h"
@@ -225,7 +225,7 @@ NODE_API_FUNC( StmtObject::exec )
225
225
baton->callback_required = callback_required;
226
226
227
227
if ( bind_required ) {
228
- if ( !getBindParameters ( baton->execData , isolate, args[0 ], baton->params ,
228
+ if ( !getBindParameters ( baton->execData , isolate, args[0 ], baton->params ,
229
229
baton->num_rows ) ) {
230
230
delete baton;
231
231
std::string error_msg;
@@ -454,7 +454,7 @@ NODE_API_FUNC( Connection::exec )
454
454
args.GetReturnValue ().SetUndefined ();
455
455
return ;
456
456
}
457
-
457
+
458
458
#if NODE_MAJOR_VERSION >= 12
459
459
String::Utf8Value param0 ( isolate, (args[0 ]->ToString (context)).ToLocalChecked () );
460
460
#else
@@ -469,7 +469,7 @@ NODE_API_FUNC( Connection::exec )
469
469
baton->stmt = std::string (*param0);
470
470
471
471
if ( bind_required ) {
472
- if ( !getBindParameters ( baton->execData , isolate, args[1 ], baton->params ,
472
+ if ( !getBindParameters ( baton->execData , isolate, args[1 ], baton->params ,
473
473
baton->num_rows ) ) {
474
474
delete baton;
475
475
std::string error_msg;
@@ -646,13 +646,13 @@ NODE_API_FUNC( Connection::prepare )
646
646
p_stmt.Reset ();
647
647
return ;
648
648
}
649
-
649
+
650
650
#if NODE_MAJOR_VERSION >= 12
651
- String::Utf8Value param0 ( isolate, (args[0 ]->ToString (context)).ToLocalChecked ());
651
+ String::Utf8Value param0 ( isolate, (args[0 ]->ToString (context)).ToLocalChecked () );
652
652
#else
653
653
String::Utf8Value param0 ( (args[0 ]->ToString (context)).ToLocalChecked () );
654
654
#endif
655
-
655
+
656
656
prepareBaton *baton = new prepareBaton ();
657
657
baton->obj = obj;
658
658
baton->callback_required = callback_required;
@@ -867,39 +867,39 @@ NODE_API_FUNC( Connection::connect )
867
867
baton->sqlca_connection = sqlca_connection;
868
868
869
869
if ( sqlca_connection ) {
870
- baton->sqlca = (void *)(long )(args[0 ]->NumberValue (context)).FromJust ();
870
+ baton->sqlca = (void *)(long )(args[0 ]->NumberValue (context)).FromJust ();
871
871
872
872
} else {
873
873
Local<String> localArg = Local<String>::New ( isolate, obj->_arg );
874
874
if ( localArg->Length () > 0 ) {
875
875
#if NODE_MAJOR_VERSION >= 12
876
- String::Utf8Value param0 ( isolate, localArg );
876
+ String::Utf8Value param0 ( isolate, localArg );
877
877
#else
878
- String::Utf8Value param0 ( localArg );
878
+ String::Utf8Value param0 ( localArg );
879
879
#endif
880
880
baton->conn_string = std::string (*param0);
881
881
} else {
882
882
baton->conn_string = std::string ();
883
883
}
884
884
if ( arg_is_string ) {
885
885
#if NODE_MAJOR_VERSION >= 12
886
- String::Utf8Value param0 ( isolate, (args[0 ]->ToString (context)).ToLocalChecked ());
886
+ String::Utf8Value param0 ( isolate, (args[0 ]->ToString (context)).ToLocalChecked ());
887
887
#else
888
- String::Utf8Value param0 ( (args[0 ]->ToString (context)).ToLocalChecked () );
888
+ String::Utf8Value param0 ( (args[0 ]->ToString (context)).ToLocalChecked () );
889
889
#endif
890
890
baton->conn_string .append ( " ;" );
891
891
baton->conn_string .append (*param0);
892
892
} else if ( arg_is_object ) {
893
893
Persistent<String> arg_string;
894
- HashToString ( isolate, args[0 ]->ToObject (isolate), arg_string );
894
+ HashToString ( isolate, args[0 ]->ToObject (isolate), arg_string );
895
895
Local<String> local_arg_string =
896
896
Local<String>::New ( isolate, arg_string );
897
897
#if NODE_MAJOR_VERSION >= 12
898
- String::Utf8Value param0 ( isolate, local_arg_string );
898
+ String::Utf8Value param0 ( isolate, local_arg_string );
899
899
#else
900
- String::Utf8Value param0 ( local_arg_string );
900
+ String::Utf8Value param0 ( local_arg_string );
901
901
#endif
902
- baton->conn_string .append ( " ;" );
902
+ baton->conn_string .append ( " ;" );
903
903
baton->conn_string .append (*param0);
904
904
arg_string.Reset ();
905
905
}
0 commit comments