Get column of mysql type: bigint
12041
public Long getLong(String column) {
		Number n = getNumber(column);
		return n != null ? n.longValue() : null;
	}
530158
public int getInternalInt(ColumnInformation columnInfo) throws SQLException {
    if (lastValueWasNull()) {
      return 0;
    }
    long value = getInternalLong(columnInfo);
    rangeCheck(Integer.class, Integer.MIN_VALUE, Integer.MAX_VALUE, value, columnInfo);
    return (int) value;
  }
1269278
public function bigInteger($column, $autoIncrement = false, $unsigned = false)
    {
        return $this->addColumn('bigInteger', $column, compact('autoIncrement', 'unsigned'));
    }
91012
public static int getColumnType (Connection conn, String table,
                                     String column)
        throws SQLException
    {
        ResultSet rs = getColumnMetaData(conn, table, column);
        try {
            return rs.getInt("DATA_TYPE");
        } finally {
            rs.close();
        }
    }
517854
public final BigDecimal getDecimalAsBigDecimal(int columnIndex) {
        validateColumnType(columnIndex, VoltType.DECIMAL);
        final int position = m_buffer.position();
        m_buffer.position(getOffset(columnIndex));
        final BigDecimal bd = VoltDecimalHelper.deserializeBigDecimal(m_buffer);
        m_buffer.position(position);
        m_wasNull = bd == null ? true : false;
        return bd;
    }
119643
def get_datatype(self, table: str, column: str) -> str:
        """"""
        return self.flavour.get_datatype(self, table, column).upper()
1147220
def get_datatype(cls,
                     db: DATABASE_SUPPORTER_FWD_REF,
                     table: str,
                     column: str) -> str:
        """"""
        raise RuntimeError(_MSG_NO_FLAVOUR)
16639
public java.math.BigInteger getBigInteger(String column) {
		return (java.math.BigInteger)getColumns().get(column);
	}
1170572
public BigDecimal getBigDecimal(int columnIndex,
                                    int scale) throws SQLException {

        if (scale < 0) {
            throw Util.outOfRangeArgument();
        }

        // boucherb@users 20020502 - added conversion
        BigDecimal bd = (BigDecimal) getColumnInType(columnIndex,
            Type.SQL_DECIMAL);

        if (bd != null) {
            bd = bd.setScale(scale, BigDecimal.ROUND_HALF_DOWN);
        }

        return bd;
    }
682015
@Override
    public BigDecimal getBigDecimal(int index) {
        indexCheck();
        return (BigDecimal) rows.get(row).getValue(index);
    }
1248272
public Class<?> getJavaType(int sqlType, String typeName, int size, int digits, String tableName, String columnName) {
        // table.column mapped class
        Type<?> type = javaTypeMapping.getType(tableName, columnName);
        if (type != null) {
            return type.getReturnedClass();
        } else if (typeName != null && !typeName.isEmpty()) {
            typeName = typeName.toLowerCase();
            // typename mapped class
            Class<?> clazz = typeToName.get(typeName);
            if (clazz != null) {
                return clazz;
            }
            if (sqlType == Types.ARRAY) {
                if (typeName.startsWith("_")) {
                    typeName = typeName.substring(1);
                } else if (typeName.endsWith(" array")) {
                    typeName = typeName.substring(0, typeName.length() - 6);
                }
                if (typeName.contains("[")) {
                    typeName = typeName.substring(0, typeName.indexOf("["));
                }
                if (typeName.contains("(")) {
                    typeName = typeName.substring(0, typeName.indexOf("("));
                }

                Integer sqlComponentType = templates.getCodeForTypeName(typeName);
                if (sqlComponentType == null) {
                    logger.warn("Found no JDBC type for " + typeName + " using OTHER instead");
                    sqlComponentType = Types.OTHER;
                }
                Class<?> componentType = jdbcTypeMapping.get(sqlComponentType, size, digits);
                return Array.newInstance(componentType, 0).getClass();
            }
        }
        // sql type mapped class
        return jdbcTypeMapping.get(sqlType, size, digits);
    }
1181283
public byte getInternalByte(ColumnInformation columnInfo) throws SQLException {
    if (lastValueWasNull()) {
      return 0;
    }
    long value;
    switch (columnInfo.getColumnType()) {
      case BIT:
        value = parseBit();
        break;
      case TINYINT:
        value = getInternalTinyInt(columnInfo);
        break;
      case SMALLINT:
      case YEAR:
        value = getInternalSmallInt(columnInfo);
        break;
      case INTEGER:
      case MEDIUMINT:
        value = getInternalMediumInt(columnInfo);
        break;
      case BIGINT:
        value = getInternalLong(columnInfo);
        break;
      case FLOAT:
        value = (long) getInternalFloat(columnInfo);
        break;
      case DOUBLE:
        value = (long) getInternalDouble(columnInfo);
        break;
      case DECIMAL:
      case OLDDECIMAL:
        BigDecimal bigDecimal = getInternalBigDecimal(columnInfo);
        rangeCheck(Byte.class, Byte.MIN_VALUE, Byte.MAX_VALUE, bigDecimal, columnInfo);
        return bigDecimal.byteValue();
      case VARSTRING:
      case VARCHAR:
      case STRING:
        value = Long.parseLong(new String(buf, pos, length, StandardCharsets.UTF_8));
        break;
      default:
        throw new SQLException(
            "getByte not available for data field type " + columnInfo.getColumnType()
                .getJavaTypeName());
    }
    rangeCheck(Byte.class, Byte.MIN_VALUE, Byte.MAX_VALUE, value, columnInfo);
    return (byte) value;
  }
1190901
@Override
    public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
        checkColumnBounds(columnIndex);
        try {
            final VoltType type = table.getColumnType(columnIndex - 1);
            BigDecimal decimalValue = null;
            switch(type) {
            case TINYINT:
                decimalValue = new BigDecimal(table.getLong(columnIndex - 1));
                break;
            case SMALLINT:
                decimalValue = new BigDecimal(table.getLong(columnIndex - 1));
                break;
            case INTEGER:
                decimalValue = new BigDecimal(table.getLong(columnIndex - 1));
                break;
            case BIGINT:
                decimalValue = new BigDecimal(table.getLong(columnIndex - 1));
                break;
            case FLOAT:
                decimalValue = new BigDecimal(table.getDouble(columnIndex - 1));
                break;
            case DECIMAL:
                decimalValue = table.getDecimalAsBigDecimal(columnIndex - 1);
                break;
            default:
                throw new IllegalArgumentException("Cannot get BigDecimal value for column type '" + type + "'");
            }

            return table.wasNull() ? null : decimalValue;
        } catch (Exception x) {
            throw SQLError.get(x);
        }
    }
98430
protected function getColumnPhpType($column)
    {
        static $typeMap = [ // abstract type => php type
            'smallint' => 'integer',
            'integer' => 'integer',
            'bigint' => 'integer',
            'timestamp' => 'integer',
            'boolean' => 'boolean',
            'float' => 'double',
        ];
        if (isset($typeMap[$column->type])) {
            if ($column->type === 'bigint') {
                return PHP_INT_SIZE == 8 ? 'integer' : 'string';
            } elseif ($column->type === 'integer' || $column->type === 'timestamp') {
                return PHP_INT_SIZE == 4 ? 'string' : 'integer';
            } else {
                return $typeMap[$column->type];
            }
        } else {
            return 'string';
        }
    }
866421
public int getScale(int column) throws SQLException
    {
        sourceResultSet.checkColumnBounds(column);
        VoltType type = sourceResultSet.table.getColumnType(column - 1);
        Integer result = type.getMaximumScale();
        if (result == null) {
            result = 0;
        }
        return result;
    }
335196
public static Type toType(String columnDef) {
		if ("BIGINT".equalsIgnoreCase(columnDef))
			return Type.BIGINT;
		if ("BINARY".equalsIgnoreCase(columnDef))
			return Type.BINARY;
		if ("BIT".equalsIgnoreCase(columnDef))
			return Type.BIT;
		if ("BLOB".equalsIgnoreCase(columnDef))
			return Type.BLOB;
		if ("BOOLEAN".equalsIgnoreCase(columnDef))
			return Type.BOOLEAN;
		if ("CHAR".equalsIgnoreCase(columnDef))
			return Type.CHAR;
		if ("CLOB".equalsIgnoreCase(columnDef))
			return Type.CLOB;
		if ("DATE".equalsIgnoreCase(columnDef))
			return Type.DATE;
		if ("DECIMAL".equalsIgnoreCase(columnDef))
			return Type.DECIMAL;
		if ("DOUBLE".equalsIgnoreCase(columnDef))
			return Type.DOUBLE;
		if ("FLOAT".equalsIgnoreCase(columnDef))
			return Type.FLOAT;
		if ("INTEGER".equalsIgnoreCase(columnDef))
			return Type.INTEGER;
		if ("JAVA_OBJECT".equalsIgnoreCase(columnDef))
			return Type.JAVA_OBJECT;
		if ("LONGNVARCHAR".equalsIgnoreCase(columnDef))
			return Type.LONGNVARCHAR;
		if ("LONGVARBINARY".equalsIgnoreCase(columnDef))
			return Type.LONGVARBINARY;
		if ("LONGVARCHAR".equalsIgnoreCase(columnDef))
			return Type.LONGVARCHAR;
		if ("NCHAR".equalsIgnoreCase(columnDef))
			return Type.NCHAR;
		if ("NCLOB".equalsIgnoreCase(columnDef))
			return Type.NCLOB;
		if ("NUMERIC".equalsIgnoreCase(columnDef))
			return Type.NUMERIC;
		if ("NVARCHAR".equalsIgnoreCase(columnDef))
			return Type.NVARCHAR;
		if ("OTHER".equalsIgnoreCase(columnDef))
			return Type.OTHER;
		if ("REAL".equalsIgnoreCase(columnDef))
			return Type.REAL;
		if ("SMALLINT".equalsIgnoreCase(columnDef))
			return Type.SMALLINT;
		if ("TIME".equalsIgnoreCase(columnDef))
			return Type.TIME;
		if ("TIMESTAMP".equalsIgnoreCase(columnDef))
			return Type.TIMESTAMP;
		if ("TINYINT".equalsIgnoreCase(columnDef))
			return Type.TINYINT;
		if ("VARBINARY".equalsIgnoreCase(columnDef))
			return Type.VARBINARY;
		if ("VARCHAR".equalsIgnoreCase(columnDef))
			return Type.VARCHAR;
		// @formatter:on
		throw new DialectException("'" + columnDef + "' is not a legal SQL column definition name");
	}
1274625
static Integer convertToInt(Object a, int type) {

        int value;

        if (a instanceof Integer) {
            if (type == Types.SQL_INTEGER) {
                return (Integer) a;
            }

            value = ((Integer) a).intValue();
        } else if (a instanceof Long) {
            long temp = ((Long) a).longValue();

            if (Integer.MAX_VALUE < temp || temp < Integer.MIN_VALUE) {
                throw Error.error(ErrorCode.X_22003);
            }

            value = (int) temp;
        } else if (a instanceof BigDecimal) {
            BigDecimal bd = ((BigDecimal) a);

            if (bd.compareTo(MAX_INT) > 0 || bd.compareTo(MIN_INT) < 0) {
                throw Error.error(ErrorCode.X_22003);
            }

            value = bd.intValue();
        } else if (a instanceof Double || a instanceof Float) {
            double d = ((Number) a).doubleValue();

            if (Double.isInfinite(d) || Double.isNaN(d)
                    || d >= (double) Integer.MAX_VALUE + 1
                    || d <= (double) Integer.MIN_VALUE - 1) {
                throw Error.error(ErrorCode.X_22003);
            }

            value = (int) d;
        } else {
            throw Error.error(ErrorCode.X_42561);
        }

        if (type == Types.TINYINT) {
            if (Byte.MAX_VALUE < value || value < Byte.MIN_VALUE) {
                throw Error.error(ErrorCode.X_22003);
            }
        } else if (type == Types.SQL_SMALLINT) {
            if (Short.MAX_VALUE < value || value < Short.MIN_VALUE) {
                throw Error.error(ErrorCode.X_22003);
            }
        }

        return ValuePool.getInt(value);
    }