File tree Expand file tree Collapse file tree 2 files changed +92
-2
lines changed Expand file tree Collapse file tree 2 files changed +92
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ function getAuroraDataValue (value) {
15
15
return value . longValue ;
16
16
} else if ( 'stringValue' in value ) {
17
17
return value . stringValue ;
18
+ } else if ( 'booleanValue' in value ) {
19
+ return value . booleanValue ;
18
20
} else /* istanbul ignore next */ {
19
21
const type = Object . keys ( value ) [ 0 ] ;
20
22
throw new Error ( `Unknown value type '${ type } ' from row` ) ;
@@ -53,7 +55,7 @@ function hydrateRecord (record, fields) {
53
55
break ;
54
56
}
55
57
56
- row [ field . name ] = value ;
58
+ row [ field . label ] = value ;
57
59
58
60
return row ;
59
61
} , { } ) ;
Original file line number Diff line number Diff line change @@ -308,6 +308,22 @@ module.exports = {
308
308
tableName : 'foo' ,
309
309
type : 4 ,
310
310
typeName : 'INT'
311
+ } ,
312
+ {
313
+ arrayBaseColumnType : 0 ,
314
+ isAutoIncrement : false ,
315
+ isCaseSensitive : false ,
316
+ isCurrency : false ,
317
+ isSigned : false ,
318
+ label : 'bool' ,
319
+ name : 'bool' ,
320
+ nullable : 0 ,
321
+ precision : 1 ,
322
+ scale : 0 ,
323
+ schemaName : '' ,
324
+ tableName : 'foo' ,
325
+ type : - 7 ,
326
+ typeName : 'BIT'
311
327
}
312
328
] ,
313
329
numberOfRecordsUpdated : 0 ,
@@ -384,6 +400,9 @@ module.exports = {
384
400
} ,
385
401
{
386
402
isNull : true
403
+ } ,
404
+ {
405
+ booleanValue : true
387
406
}
388
407
]
389
408
]
@@ -408,7 +427,8 @@ module.exports = {
408
427
text : 'test' ,
409
428
enum : 'one' ,
410
429
set : new Set ( [ 'one' , 'two' ] ) ,
411
- null : null
430
+ null : null ,
431
+ bool : true
412
432
}
413
433
] ,
414
434
@@ -1852,6 +1872,68 @@ module.exports = {
1852
1872
{
1853
1873
stringValue : ''
1854
1874
}
1875
+ ] ,
1876
+ [
1877
+ {
1878
+ stringValue : 'def'
1879
+ } ,
1880
+ {
1881
+ stringValue : 'test'
1882
+ } ,
1883
+ {
1884
+ stringValue : 'foo'
1885
+ } ,
1886
+ {
1887
+ stringValue : 'bool'
1888
+ } ,
1889
+ {
1890
+ longValue : 22
1891
+ } ,
1892
+ {
1893
+ stringValue : '0'
1894
+ } ,
1895
+ {
1896
+ stringValue : 'NO'
1897
+ } ,
1898
+ {
1899
+ stringValue : 'tinyint'
1900
+ } ,
1901
+ {
1902
+ isNull : true
1903
+ } ,
1904
+ {
1905
+ isNull : true
1906
+ } ,
1907
+ {
1908
+ longValue : 3
1909
+ } ,
1910
+ {
1911
+ longValue : 0
1912
+ } ,
1913
+ {
1914
+ isNull : true
1915
+ } ,
1916
+ {
1917
+ isNull : true
1918
+ } ,
1919
+ {
1920
+ isNull : true
1921
+ } ,
1922
+ {
1923
+ stringValue : 'tinyint(1)'
1924
+ } ,
1925
+ {
1926
+ stringValue : ''
1927
+ } ,
1928
+ {
1929
+ stringValue : ''
1930
+ } ,
1931
+ {
1932
+ stringValue : 'select,insert'
1933
+ } ,
1934
+ {
1935
+ stringValue : ''
1936
+ }
1855
1937
]
1856
1938
]
1857
1939
} ,
@@ -1964,6 +2046,12 @@ module.exports = {
1964
2046
type : 'set' ,
1965
2047
maxLength : 13 ,
1966
2048
nullable : true
2049
+ } ,
2050
+ bool : {
2051
+ defaultValue : '0' ,
2052
+ type : 'tinyint' ,
2053
+ maxLength : null ,
2054
+ nullable : false
1967
2055
}
1968
2056
} ,
1969
2057
You can’t perform that action at this time.
0 commit comments