How to use the Numeric function from mssql

Find comprehensive JavaScript mssql.Numeric code examples handpicked from public code repositorys.

155
156
157
158
159
160
161
162
163
164
case 'decimal':
    type = mssql.Decimal;
    
    break;
case 'numeric':
    type = mssql.Numeric;
    
    break;
case 'float':
    type = mssql.Float;
fork icon6
star icon6
watch icon1

74
75
76
77
78
79
80
81
82
83
case 'sql.BigInt':           return sql.BigInt;
case 'sql.Decimal':          return sql.Decimal;
case 'sql.Float':            return sql.Float;
case 'sql.Int':              return sql.Int;
case 'sql.Money':            return sql.Money;
case 'sql.Numeric':          return sql.Numeric;
case 'sql.SmallInt':         return sql.SmallInt ;
case 'sql.SmallMoney':       return sql.SmallMoney;
case 'sql.Real':             return sql.Real ;
case 'sql.TinyInt':          return sql.TinyInt ;
fork icon0
star icon0
watch icon0

+ 5 other calls in file

44
45
46
47
48
49
50
51
52
53
table.columns.add('LOW', sql.NVarChar(50), {nullable: false});
table.columns.add('CLOSE', sql.NVarChar(50), {nullable: false});
table.columns.add('VOLUME', sql.NVarChar(50), {nullable: false});
table.columns.add('TIMECLOSE', sql.DateTime);
table.columns.add('ASSETVOLUME', sql.NVarChar(50), {nullable: false});
table.columns.add('TRADES', sql.Numeric(38), {nullable: false});
table.columns.add('BUYBASEVOLUME', sql.NVarChar(50), {nullable: false});
table.columns.add('BUYASSETVOLUME', sql.NVarChar(50), {nullable: false});

    xCOIN='BTCUSDT'
fork icon0
star icon0
watch icon0

85
86
87
88
89
90
91
92
93
94
  break;
case 'varchar':
  type = mssql.VarChar(columnProperty.CHARACTER_MAXIMUM_LENGTH + numberCharactersSpecials);
  break;
case 'numeric':
  type = mssql.Numeric(columnProperty.NUMERIC_PRECISION, columnProperty.NUMERIC_SCALE);
  break;
case 'bigint':
  type = mssql.BigInt();
  break;
fork icon0
star icon0
watch icon1

+ 3 other calls in file

36
37
38
39
40
41
42
43
44
45
Orden.prototype.trabajocobrado = function (objTrabajoCobrado, callback) {
    var self = this.connection;
    this.connection.connect(function (err) {
        // Stored Procedure 
        var request = new sql.Request(self);
        request.input('idTrabajo', sql.Numeric(18, 0), objTrabajoCobrado.idTrabajo);
        request.execute('INS_TRABAJO_CONCLUIDO_SP', function (err, recordsets, returnValue) {
            if (recordsets != null) {
                callback(err, recordsets[0]);
            } else {
fork icon0
star icon0
watch icon6

+ 3 other calls in file

74
75
76
77
78
79
80
81
82
83

app.post('/add_budget_line', function (req, res) {
    var body = JSON.parse(req.body);
    return app.pool.request()
    .input('Chantier', sql.Numeric(18,0), body.Chantier)
    .input('Activite', sql.Numeric(18,0), body.Activite)
    .input('Origine', sql.VarChar(50), body.Origine)
    .input('Date', sql.DateTime, body.Date)
    .input('Montant', sql.Float, body.Montant)
    .input('Quantite', sql.Float, body.Quantite)
fork icon0
star icon0
watch icon2

+ 3 other calls in file