def get_rec(r_dict, column_order):
    if include_schema_table:
        r_dict['schema'] = schema
        r_dict['table'] = table
    r_dict['column_name'] = r_dict['name']
    r_dict['type'] = str(r_dict['type'])
    if (not native_type):
        r_dict['type'] = r_dict['type'].lower()
        r_dict['type'] = (r_dict['type'].split('(')[0] if ('(' in r_dict['type']) else r_dict['type'])
        native_type_map = self._template('native_type_map')
        if (not (r_dict['type'] in native_type_map)):
            raise Exception('Field type "{}" not in native_type_map for {}'.format(r_dict['type'], self.type))
        r_dict['type'] = native_type_map[r_dict['type']]
    r_dict['id'] = column_order
    for k in list(r_dict):
        if (k not in headers.split()):
            del r_dict[k]
    if ('(' in r_dict['type']):
        r_dict['type'] = r_dict['type'].split('(')[0]
    return Rec(**r_dict)
def get_rec(r_dict, column_order):
    if include_schema_table:
        r_dict['schema'] = schema
        r_dict['table'] = table
    r_dict['column_name'] = r_dict['name']
    r_dict['type'] = str(r_dict['type'])
    if (not native_type):
        r_dict['type'] = r_dict['type'].lower()
        r_dict['type'] = (r_dict['type'].split('(')[0] if ('(' in r_dict['type']) else r_dict['type'])
        native_type_map = self._template('native_type_map')
        if (not (r_dict['type'] in native_type_map)):
            raise Exception('Field type "{}" not in native_type_map for {}'.format(r_dict['type'], self.type))
        r_dict['type'] = native_type_map[r_dict['type']]
    r_dict['id'] = column_order
    for k in list(r_dict):
        if (k not in headers.split()):
            del r_dict[k]
    if ('(' in r_dict['type']):
        r_dict['type'] = r_dict['type'].split('(')[0]
    return Rec(**r_dict)