You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -558,6 +568,7 @@ export class BigQuery extends Service {
558
568
}
559
569
case'INTEGER':
560
570
case'INT64': {
571
+
const{wrapIntegers}=options;
561
572
value=wrapIntegers
562
573
? typeofwrapIntegers==='object'
563
574
? BigQuery.int(
@@ -580,8 +591,7 @@ export class BigQuery extends Service {
580
591
value=BigQuery.mergeSchemaWithRows_(
581
592
schemaField,
582
593
value,
583
-
wrapIntegers,
584
-
selectedFields
594
+
options
585
595
).pop();
586
596
break;
587
597
}
@@ -605,6 +615,11 @@ export class BigQuery extends Service {
605
615
value=BigQuery.geography(value);
606
616
break;
607
617
}
618
+
case'JSON': {
619
+
const{parseJSON}=options;
620
+
value=parseJSON ? JSON.parse(value) : value;
621
+
break;
622
+
}
608
623
default:
609
624
break;
610
625
}
@@ -1311,6 +1326,7 @@ export class BigQuery extends Service {
1311
1326
* the format of the {@link https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#DatasetReference| `DatasetReference`}
1312
1327
* @param {boolean} [options.wrapIntegers] Optionally wrap INT64 in BigQueryInt
1313
1328
* or custom INT64 value type.
1329
+
* @param {boolean} [options.parseJSON] Optionally parse JSON as a JSON Object.
1314
1330
* @param {object|array} [options.params] Option to provide query prarameters.
1315
1331
* @param {JobCallback} [callback] The callback function.
1316
1332
* @param {?error} callback.err An error returned while making this request.
@@ -2041,6 +2057,7 @@ export class BigQuery extends Service {
2041
2057
typeofquery==='object'
2042
2058
? {
2043
2059
wrapIntegers: query.wrapIntegers,
2060
+
parseJSON: query.parseJSON,
2044
2061
}
2045
2062
: {};
2046
2063
constcallback=
@@ -2073,20 +2090,22 @@ export class BigQuery extends Service {
0 commit comments