File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,12 @@ VALUES
60
60
61
61
Following types are supported:
62
62
* `` string ``
63
- * `` number ``
63
+ * `` number `` (will be converted to MSSQL `` int `` )
64
64
* `` bigint ``
65
65
* `` boolean `` (will be converted to MSSQL `` bit `` )
66
- * `` date ``
66
+ * `` float ``
67
+ * `` date `` (will be converted to `` DateTime2 `` )
68
+ * `` money ``
67
69
68
70
more details can be found [ here] ( https://github.com/elasticio/mssql-component/blob/master/lib/actions/insert.js#L25 )
69
71
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const cosql = require('co-mssql');
5
5
6
6
let pstmt ;
7
7
8
- const VARS_REGEXP = / @ ( [ \w _ $ ] [ \d \w _ $ ] * : ( s t r i n g | b o o l e a n | d a t e | n u m b e r | b i g i n t ) ) / g;
8
+ const VARS_REGEXP = / @ ( [ \w _ $ ] [ \d \w _ $ ] * : ( s t r i n g | b o o l e a n | d a t e | n u m b e r | b i g i n t | f l o a t | r e a l | m o n e y ) ) / g;
9
9
10
10
/**
11
11
* This function will be called during component intialization
@@ -37,9 +37,18 @@ function init(cfg) {
37
37
case 'number' :
38
38
pstmt . input ( name , cosql . Int ) ;
39
39
break ;
40
+ case 'float' :
41
+ pstmt . input ( name , cosql . Float ) ;
42
+ break ;
43
+ case 'real' :
44
+ pstmt . input ( name , cosql . Real ) ;
45
+ break ;
40
46
case 'boolean' :
41
47
pstmt . input ( name , cosql . Bit ) ;
42
48
break ;
49
+ case 'money' :
50
+ pstmt . input ( name , cosql . Money ) ;
51
+ break ;
43
52
case 'date' :
44
53
pstmt . input ( name , cosql . DateTime2 ) ;
45
54
break ;
You can’t perform that action at this time.
0 commit comments