How to use the mssql.Float function in mssql

To help you get started, we’ve selected a few mssql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DFEAGILEDEVOPS / MTC / admin / services / data-access / sql.service.js View on Github external
}
  return params
}

/** SQL Service **/
const sqlService = {
  // SQL type-mapping adapter.  Add new types as required.
  TYPES: {
    BigInt: mssql.BigInt,
    Bit: mssql.Bit,
    Char: mssql.Char,
    DateTimeOffset: mssql.DateTimeOffset,
    DateTime: mssql.DateTime,
    DateTime2: mssql.DateTime2,
    Decimal: mssql.Decimal,
    Float: mssql.Float,
    Int: mssql.Int,
    Numeric: mssql.Numeric,
    NVarChar: mssql.NVarChar,
    Real: mssql.Real,
    SmallInt: mssql.SmallInt,
    UniqueIdentifier: mssql.UniqueIdentifier
  }
}

// Name of the admin database
sqlService.adminSchema = '[mtc_admin]'

sqlService.initPool = async () => {
  if (pool) {
    logger.warn('The connection pool has already been initialised')
    return
github DFEAGILEDEVOPS / MTC / deploy / sql / schema-WIP / sql.service.js View on Github external
}
  return params
}

/** SQL Service **/
const sqlService = {
  // SQL type-mapping adapter.  Add new types as required.
  TYPES: {
    BigInt: mssql.BigInt,
    Bit: mssql.Bit,
    Char: mssql.Char,
    DateTimeOffset: mssql.DateTimeOffset,
    DateTime: mssql.DateTime,
    DateTime2: mssql.DateTime2,
    Decimal: mssql.Decimal,
    Float: mssql.Float,
    Int: mssql.Int,
    Numeric: mssql.Numeric,
    NVarChar: mssql.NVarChar,
    Real: mssql.Real,
    SmallInt: mssql.SmallInt,
    UniqueIdentifier: mssql.UniqueIdentifier
  }
}

// Name of the admin database
sqlService.adminSchema = '[mtc_admin]'

sqlService.initPool = async () => {
  if (pool) {
    logger.warn('The connection pool has already been initialised')
    return
github DFEAGILEDEVOPS / MTC / design / z_archive / census-import / services / data-access / sql.service.js View on Github external
options
    })
  }
  return params
}

/** SQL Service **/
const sqlService = {
  // SQL type-mapping adapter.  Add new types as required.
  TYPES: {
    BigInt: mssql.BigInt,
    Bit: mssql.Bit,
    Char: mssql.Char,
    DateTimeOffset: mssql.DateTimeOffset,
    Decimal: mssql.Decimal,
    Float: mssql.Float,
    Int: mssql.Int,
    Numeric: mssql.Numeric,
    NVarChar: mssql.NVarChar,
    Real: mssql.Real,
    SmallInt: mssql.SmallInt,
    UniqueIdentifier: mssql.UniqueIdentifier
  }
}

// Name of the admin database
sqlService.adminSchema = '[mtc_admin]'

sqlService.initPool = async () => {
  if (pool) {
    logger.warn('The connection pool has already been initialised')
    return
github totaljs / eshop / node_modules / sqlagent / sqlserver.js View on Github external
switch (type) {
			case 'number':
				request.input(param.name, value % 1 === 0 ? database.Int : database.Decimal, value);
				break;
			case 'decimal':
				request.input(param.name, database.Decimal, value);
				break;
			case 'uniqueidentifier':
			case 'guid':
				request.input(param.name, database.UniqueIdentifier, value);
				break;
			case 'money':
				request.input(param.name, database.Money, value);
				break;
			case 'float':
				request.input(param.name, database.Float, value);
				break;
			case 'bigint':
				request.input(param.name, database.BigInt, value);
				break;
			case 'smallint':
			case 'byte':
				request.input(param.name, database.SmallInt, value);
				break;
			case 'string':
			case 'nvarchar':
				request.input(param.name, database.NVarChar, value);
				break;
			case 'boolean':
			case 'bit':
				request.input(param.name, database.Bit, value);
				break;
github totaljs / node-sqlagent / sqlserver.js View on Github external
switch (type) {
			case 'number':
				request.input(param.name, value % 1 === 0 ? database.Int : database.Float, value);
				break;
			case 'decimal':
				request.input(param.name, database.Decimal, value);
				break;
			case 'uniqueidentifier':
			case 'guid':
				request.input(param.name, database.UniqueIdentifier, value);
				break;
			case 'money':
				request.input(param.name, database.Money, value);
				break;
			case 'float':
				request.input(param.name, database.Float, value);
				break;
			case 'bigint':
				request.input(param.name, database.BigInt, value);
				break;
			case 'smallint':
			case 'byte':
				request.input(param.name, database.SmallInt, value);
				break;
			case 'string':
			case 'nvarchar':
				request.input(param.name, database.NVarChar, value);
				break;
			case 'boolean':
			case 'bit':
				request.input(param.name, database.Bit, value);
				break;