Returns the column type name, in VoltDB, corresponding to the specified
column type name in PostgreSQL.
974105
@Override
    protected String getVoltColumnTypeName(String columnTypeName) {
        String equivalentTypeName = m_PostgreSQLTypeNames.get(columnTypeName);
        return (equivalentTypeName == null) ? columnTypeName.toUpperCase() : equivalentTypeName;
    }
1254651
public int getColumnType( int index ) throws OdaException
	{
		//return Types.JAVA_OBJECT;//Any OrientDB field may be NULL
		///*
		String fieldName = getColumnName(index);
		OType fieldType = rowDoc.fieldType(fieldName);
		if (fieldType!=null){
			return typesSqlTypes.get(fieldType);
		}else{
			return Types.VARCHAR;
			//throw new OdaException("Unknown OType of field "+fieldName+" with index "+index);
		}
		//*/
	}
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)
326942
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
    public static int getType(Cursor cursor, String columnName) {
        if (cursor == null) {
            return Cursor.FIELD_TYPE_NULL;
        }

        return cursor.getType(cursor.getColumnIndex(columnName));
    }
579944
def columnType( self ):
        
        schema = self.treeWidget().parent().schema()
        if ( not schema ):
            return 0
        column = schema.column(self.text(0))
        if ( column ):
            return column.columnType()
        return ColumnType.String
1141925
def get_column_info(connection, table_name):
	
	cursor = connection.cursor()
	cursor.execute("SELECT sql FROM sqlite_master WHERE type == 'table' AND name == ?", (table_name,))
	statement, = cursor.fetchone()
	coldefs = re.match(_sql_create_table_pattern, statement).groupdict()["coldefs"]
	return [(coldef.groupdict()["name"], coldef.groupdict()["type"]) for coldef in re.finditer(_sql_coldef_pattern, coldefs) if coldef.groupdict()["name"].upper() not in ("PRIMARY", "UNIQUE", "CHECK")]
210858
function getDBTypeFromDBValue(db) {
    if (constants.SQL_DB_OPTIONS.map(db => db.value).includes(db)) {
        return 'sql';
    }
    return db;
}
1326288
function(db) {
    if (!db.type) {
      return defaultDbType;
    }

    return dbTypes.find(function(dbType) {
      return dbType.name === db.type;
    }) || null;
  }
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);
    }
1047872
public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException
    {
        if (this.isNull())
        {
            if ((this.isNullable()) && (iType != DBConstants.SQL_SELECT_TYPE))
                statement.setNull(iParamColumn, Types.FLOAT);
            else
                statement.setFloat(iParamColumn, Float.NaN);
        }
        else
        {
            if (DBConstants.FALSE.equals(this.getRecord().getTable().getDatabase().getProperties().get(SQLParams.FLOAT_XFER_SUPPORTED)))    // HACK for Access
                super.getSQLFromField(statement, iType, iParamColumn);
            else
                statement.setFloat(iParamColumn, (float)this.getValue());
        }
    }
991092
public function getTypeInformation($type_name, $type_schema = null)
    {
        $condition = Where::create("t.typname = $*", [$type_name]);
        $sql = <<<SQL
select
    t.oid as "oid",
    t.typcategory as "category"
from
    pg_catalog.pg_type t :join
where
    {condition}
SQL;

        if ($type_schema !== null) {
            $sql = strtr($sql, [':join' => 'join pg_namespace n on n.oid = t.typnamespace']);
            $condition->andWhere('n.nspname = $*', [$type_schema]);
        } else {
            $sql = strtr($sql, [':join' => '']);
        }

        $iterator = $this->executeSql($sql, $condition);

        return $iterator->isEmpty() ? null : $iterator->current();
    }
926905
def _json_column(**kwargs):
    """"""
    return db.Column(
        JSONType().with_variant(
            postgresql.JSON(none_as_null=True),
            'postgresql',
        ),
        nullable=True,
        **kwargs
    )
464699
public static String getColumnType(DriverTypeEnum.ConnectionProperties theConnectionProperties, String theTableName, String theColumnName) throws SQLException {
		DataSource dataSource = Objects.requireNonNull(theConnectionProperties.getDataSource());
		try (Connection connection = dataSource.getConnection()) {
			return theConnectionProperties.getTxTemplate().execute(t -> {
				DatabaseMetaData metadata;
				try {
					metadata = connection.getMetaData();
					String catalog = connection.getCatalog();
					String schema = connection.getSchema();
					ResultSet indexes = metadata.getColumns(catalog, schema, massageIdentifier(metadata, theTableName), null);

					while (indexes.next()) {

						String tableName = toUpperCase(indexes.getString("TABLE_NAME"), Locale.US);
						if (!theTableName.equalsIgnoreCase(tableName)) {
							continue;
						}
						String columnName = toUpperCase(indexes.getString("COLUMN_NAME"), Locale.US);
						if (!theColumnName.equalsIgnoreCase(columnName)) {
							continue;
						}

						int dataType = indexes.getInt("DATA_TYPE");
						Long length = indexes.getLong("COLUMN_SIZE");
						switch (dataType) {
							case Types.VARCHAR:
								return BaseTableColumnTypeTask.ColumnTypeEnum.STRING.getDescriptor(length);
							case Types.NUMERIC:
							case Types.BIGINT:
							case Types.DECIMAL:
								return BaseTableColumnTypeTask.ColumnTypeEnum.LONG.getDescriptor(null);
							case Types.INTEGER:
								return BaseTableColumnTypeTask.ColumnTypeEnum.INT.getDescriptor(null);
							case Types.TIMESTAMP:
							case Types.TIMESTAMP_WITH_TIMEZONE:
								return BaseTableColumnTypeTask.ColumnTypeEnum.DATE_TIMESTAMP.getDescriptor(null);
							default:
								throw new IllegalArgumentException("Don't know how to handle datatype " + dataType + " for column " + theColumnName + " on table " + theTableName);
						}

					}

					return null;

				} catch (SQLException e) {
					throw new InternalErrorException(e);
				}

			});
		}
	}
215960
def get_column(self, column_name, column_type, index, verbose=True):
        
        return LazyOpResult(
            grizzly_impl.get_column(
                self.expr,
                self.weld_type,
                index
            ),
            column_type,
            1
        )
1359222
public ColumnType getType(String columnName) {
        if (!hasColumn(columnName)) {
            throw new IllegalArgumentException("Column \"" + columnName + "\" does not exist in schema");
        }
        return getMetaData(columnName).getColumnType();
    }
292309
def get_column_metadata(conn, table: str, schema='public'):
    """"""
    query = """\
SELECT
  attname as name,
  format_type(atttypid, atttypmod) AS data_type,
  NOT attnotnull AS nullable
FROM pg_catalog.pg_attribute
WHERE attrelid=%s::regclass
  AND attnum > 0 AND NOT attisdropped
ORDER BY attnum;"""

    qualified_name = compile_qualified_name(table, schema=schema)

    for record in select_dict(conn, query, params=(qualified_name,)):
        yield record