File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -10,26 +10,27 @@ var Result = function() {
10
10
11
11
var p = Result . prototype ;
12
12
13
- var matchRegexp = / ( [ A - Z a - z ] + ) ( \d + ) ? ( \d + ) ? /
13
+ var matchRegexp = / ( [ A - Z a - z ] + ) ( \d + ) ? ( \d + ) ? / ;
14
14
15
15
//adds a command complete message
16
16
p . addCommandComplete = function ( msg ) {
17
+ var match ;
17
18
if ( msg . text ) {
18
19
//pure javascript
19
- var match = matchRegexp . exec ( msg . text ) ;
20
+ match = matchRegexp . exec ( msg . text ) ;
20
21
} else {
21
22
//native bindings
22
- var match = matchRegexp . exec ( msg . command ) ;
23
+ match = matchRegexp . exec ( msg . command ) ;
23
24
}
24
25
if ( match ) {
25
26
this . command = match [ 1 ] ;
26
27
//match 3 will only be existing on insert commands
27
28
if ( match [ 3 ] ) {
28
29
//msg.value is from native bindings
29
- this . rowCount = parseInt ( match [ 3 ] || msg . value ) ;
30
- this . oid = parseInt ( match [ 2 ] ) ;
30
+ this . rowCount = parseInt ( match [ 3 ] || msg . value , 10 ) ;
31
+ this . oid = parseInt ( match [ 2 ] , 10 ) ;
31
32
} else {
32
- this . rowCount = parseInt ( match [ 2 ] ) ;
33
+ this . rowCount = parseInt ( match [ 2 ] , 10 ) ;
33
34
}
34
35
}
35
36
} ;
You can’t perform that action at this time.
0 commit comments