{"size": 1466, "ext": "js", "max_stars_repo_path": "src/dataTypes.js", "max_stars_repo_name": "stam/sequelize-test-helpers", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/dataTypes.js", "max_issues_repo_name": "stam/sequelize-test-helpers", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/dataTypes.js", "max_forks_repo_name": "stam/sequelize-test-helpers", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 15.4315789474, "max_line_length": 80, "alphanum_fraction": 0.6371077763}
/* istanbul ignore next  */
const noop = () => {}

function NumericType() {
  return NumericType
}

NumericType.UNSIGNED = NumericType
NumericType.ZEROFILL = NumericType

function StringType() {
  return StringType
}

StringType.BINARY = StringType

// see http://docs.sequelizejs.com/variable/index.html#static-variable-DataTypes
const basicTypes = [
  'ABSTRACT',
  'ARRAY',
  'BLOB',
  'BOOLEAN',
  'CIDR',
  'DATE',
  'DATEONLY',
  'ENUM',
  'GEOGRAPHY',
  'GEOMETRY',
  'HSTORE',
  'HSTORE',
  'INET',
  'JSON',
  'JSONB',
  'JSONTYPE',
  'MACADDR',
  'MEDIUMINT',
  'NOW',
  'NUMBER',
  'NUMERIC',
  'RANGE',
  'TEXT',
  'TIME',
  'UUID',
  'UUIDV1',
  'UUIDV4',
  'VIRTUAL'
]

const numericTypes = [
  'BIGINT',
  'DECIMAL',
  'DOUBLE',
  'DOUBLE PRECISION',
  'FLOAT',
  'INTEGER',
  'REAL',
  'SMALLINT',
  'TINYINT'
]

const stringTypes = ['CHAR', 'STRING']

const basicDataTypes = basicTypes.reduce((acc, elem) => {
  acc[elem] = noop
  return acc
}, {})

const numericDataTypes = numericTypes.reduce((acc, elem) => {
  acc[elem] = NumericType
  return acc
}, basicDataTypes)

const dataTypes = stringTypes.reduce((acc, elem) => {
  acc[elem] = StringType
  return acc
}, numericDataTypes)

const deferrables = [
  'INITIALLY_IMMEDIATE',
  'INITIALLY_DEFERRED',
  'NOT',
  'SET_DEFERRED',
  'SET_IMMEDIATE'
]

const Deferrable = deferrables.reduce((acc, elem) => {
  acc[elem] = elem
  return acc
}, {})

module.exports = {
  ...dataTypes,
  Deferrable
}
