File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ export class PGOid extends WrappedNumber {
257
257
value : string ;
258
258
constructor ( value : string ) {
259
259
super ( ) ;
260
- this . value = value . toString ( ) ;
260
+ this . value = value ;
261
261
}
262
262
valueOf ( ) : number {
263
263
const num = Number ( this . value ) ;
Original file line number Diff line number Diff line change @@ -828,7 +828,7 @@ describe('Spanner', () => {
828
828
} ) ;
829
829
830
830
describe ( 'oids' , ( ) => {
831
- it ( 'POSTGRESQL should read pgOid values' , function ( done ) {
831
+ it ( 'POSTGRESQL should read non-null pgOid values' , function ( done ) {
832
832
if ( IS_EMULATOR_ENABLED ) {
833
833
this . skip ( ) ;
834
834
}
@@ -842,6 +842,21 @@ describe('Spanner', () => {
842
842
done ( ) ;
843
843
} ) ;
844
844
} ) ;
845
+
846
+ it ( 'POSTGRESQL should read null pgOid values' , function ( done ) {
847
+ if ( IS_EMULATOR_ENABLED ) {
848
+ this . skip ( ) ;
849
+ }
850
+ PG_DATABASE . run ( 'SELECT null::oid' , ( err , rows ) => {
851
+ assert . ifError ( err ) ;
852
+ let queriedValue = rows [ 0 ] [ 0 ] . value ;
853
+ if ( rows [ 0 ] [ 0 ] . value ) {
854
+ queriedValue = rows [ 0 ] [ 0 ] . value . value ;
855
+ }
856
+ assert . strictEqual ( queriedValue , null ) ;
857
+ done ( ) ;
858
+ } ) ;
859
+ } ) ;
845
860
} ) ;
846
861
847
862
describe ( 'float64s' , ( ) => {
You can’t perform that action at this time.
0 commit comments