classes/PodsAPI.php
public static function detect_pod_field_from_sql_data_type( $sql_field ) {

		$sql_field = strtolower( $sql_field );

		$field_to_field_map = array(
			'tinyint'    => 'number',
			'smallint'   => 'number',
			'mediumint'  => 'number',
			'int'        => 'number',
			'bigint'     => 'number',
			'float'      => 'number',
			'double'     => 'number',
			'decimal'    => 'number',
			'date'       => 'date',
			'datetime'   => 'datetime',
			'timestamp'  => 'datetime',
			'time'       => 'time',
			'year'       => 'date',
			'varchar'    => 'text',
			'text'       => 'paragraph',
			'mediumtext' => 'paragraph',
			'longtext'   => 'paragraph'
		);

		return ( array_key_exists( $sql_field, $field_to_field_map ) ) ? $field_to_field_map[ $sql_field ] : 'paragraph';
	}
public static function detect_pod_field_from_sql_data_type( $sql_field ) {

		$sql_field = strtolower( $sql_field );

		$field_to_field_map = array(
			'tinyint'    => 'number',
			'smallint'   => 'number',
			'mediumint'  => 'number',
			'int'        => 'number',
			'bigint'     => 'number',
			'float'      => 'number',
			'double'     => 'number',
			'decimal'    => 'number',
			'date'       => 'date',
			'datetime'   => 'datetime',
			'timestamp'  => 'datetime',
			'time'       => 'time',
			'year'       => 'date',
			'varchar'    => 'text',
			'text'       => 'paragraph',
			'mediumtext' => 'paragraph',
			'longtext'   => 'paragraph'
		);

		return ( array_key_exists( $sql_field, $field_to_field_map ) ) ? $field_to_field_map[ $sql_field ] : 'paragraph';
	}
public static function detect_pod_field_from_sql_data_type ( $ sql_field ) { $ sql_field = strtolower ( $ sql_field ) ; $ field_to_field_map = array ( 'tinyint' => 'number' , 'smallint' => 'number' , 'mediumint' => 'number' , 'int' => 'number' , 'bigint' => 'number' , 'float' => 'number' , 'double' => 'number' , 'decimal' => 'number' , 'date' => 'date' , 'datetime' => 'datetime' , 'timestamp' => 'datetime' , 'time' => 'time' , 'year' => 'date' , 'varchar' => 'text' , 'text' => 'paragraph' , 'mediumtext' => 'paragraph' , 'longtext' => 'paragraph' ) ; return ( array_key_exists ( $ sql_field , $ field_to_field_map ) ) ? $ field_to_field_map [ $ sql_field ] : 'paragraph' ; }
Takes a sql field such as tinyint and returns the pods field type, such as num.

@param string $sql_field The SQL field to look for

@return string The field type

@since 2.0.0
Takes a sql field such as tinyint and returns the pods field type such as num .