How to use the tedious.TYPES.Decimal function in tedious

To help you get started, we’ve selected a few tedious 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 / setting-log.data.service.js View on Github external
settingLogDataService.sqlCreate = async function (loadingTimeLimit, questionTimeLimit, userId) {
  const sql = `INSERT ${sqlService.adminSchema}.[settingsLog] (loadingTimeLimit, questionTimeLimit, user_id) 
  VALUES (@loadingTimeLimit, @questionTimeLimit, @userId)`
  const params = [
    {
      name: 'loadingTimeLimit',
      value: loadingTimeLimit,
      type: TYPES.Decimal,
      scale: 2,
      precision: 5
    },
    {
      name: 'questionTimeLimit',
      value: questionTimeLimit,
      type: TYPES.Decimal,
      scale: 2,
      precision: 5
    },
    {
      name: 'userId',
      value: userId,
      type: TYPES.Int
    }
  ]
  return sqlService.modify(sql, params)
}
github DFEAGILEDEVOPS / MTC / admin / services / data-access / setting.data.service.js View on Github external
settingDataService.sqlUpdate = async (loadingTimeLimit, questionTimeLimit) => {
  const sql = 'UPDATE [Settings] SET loadingTimeLimit=@loadingTimeLimit, questionTimeLimit=@questionTimeLimit, updatedAt=GETUTCDATE() WHERE id=1'
  const params = [
    {
      name: 'loadingTimeLimit',
      value: loadingTimeLimit,
      type: TYPES.Decimal,
      scale: 2,
      precision: 5
    },
    {
      name: 'questionTimeLimit',
      value: questionTimeLimit,
      type: TYPES.Decimal,
      scale: 2,
      precision: 5
    }
  ]
  return sqlService.modify(sql, params)
}
github DFEAGILEDEVOPS / MTC / admin / services / data-access / setting.data.service.js View on Github external
settingDataService.sqlUpdate = async (loadingTimeLimit, questionTimeLimit) => {
  const sql = 'UPDATE [Settings] SET loadingTimeLimit=@loadingTimeLimit, questionTimeLimit=@questionTimeLimit, updatedAt=GETUTCDATE() WHERE id=1'
  const params = [
    {
      name: 'loadingTimeLimit',
      value: loadingTimeLimit,
      type: TYPES.Decimal,
      scale: 2,
      precision: 5
    },
    {
      name: 'questionTimeLimit',
      value: questionTimeLimit,
      type: TYPES.Decimal,
      scale: 2,
      precision: 5
    }
  ]
  return sqlService.modify(sql, params)
}
github DFEAGILEDEVOPS / MTC / admin / services / data-access / setting-log.data.service.js View on Github external
settingLogDataService.sqlCreate = async function (loadingTimeLimit, questionTimeLimit, userId) {
  const sql = `INSERT ${sqlService.adminSchema}.[settingsLog] (loadingTimeLimit, questionTimeLimit, user_id) 
  VALUES (@loadingTimeLimit, @questionTimeLimit, @userId)`
  const params = [
    {
      name: 'loadingTimeLimit',
      value: loadingTimeLimit,
      type: TYPES.Decimal,
      scale: 2,
      precision: 5
    },
    {
      name: 'questionTimeLimit',
      value: questionTimeLimit,
      type: TYPES.Decimal,
      scale: 2,
      precision: 5
    },
    {
      name: 'userId',
      value: userId,
      type: TYPES.Int
    }
  ]