labpack/databases/sql.py
def _parse_columns(self):

        ''' a helper method for parsing the column properties from the record schema '''

        # construct column list
        column_map = {}
        for key, value in self.model.keyMap.items():
            record_key = key[1:]
            if record_key:
                if self.item_key.findall(record_key):
                    pass
                else:
                    if value['value_datatype'] == 'map' and not key in self.empty_maps:
                        continue
                    datatype = value['value_datatype']
                    # label empty map fields as lists for column determinations
                    if value['value_datatype'] == 'map':
                        datatype = 'list'
                    if value['value_datatype'] == 'number':
                        datatype = 'float'
                        if 'integer_data' in value.keys():
                            if value['integer_data']:
                                datatype = 'integer'
                    replace_key = ''
                    if 'field_metadata' in value.keys():
                        if 'replace_key' in value['field_metadata'].keys():
                            if isinstance(value['field_metadata']['replace_key'], str):
                                replace_key = value['field_metadata']['replace_key']
                    max_length = None
                    if 'max_length' in value.keys():
                        max_length = value['max_length']
                    column_map[record_key] = (record_key, datatype, replace_key, max_length)

        return column_map
 a helper method for parsing the column properties from the record schema 
a helper method for parsing the column properties from the record schema
a helper method for parsing the column properties from the record schema
def _parse_columns(self):
        column_map = {}
        for key, value in self.model.keyMap.items():
            record_key = key[1:]
            if record_key:
                if self.item_key.findall(record_key):
                    pass
                else:
                    if value['value_datatype'] == 'map' and not key in self.empty_maps:
                        continue
                    datatype = value['value_datatype']
                    if value['value_datatype'] == 'map':
                        datatype = 'list'
                    if value['value_datatype'] == 'number':
                        datatype = 'float'
                        if 'integer_data' in value.keys():
                            if value['integer_data']:
                                datatype = 'integer'
                    replace_key = ''
                    if 'field_metadata' in value.keys():
                        if 'replace_key' in value['field_metadata'].keys():
                            if isinstance(value['field_metadata']['replace_key'], str):
                                replace_key = value['field_metadata']['replace_key']
                    max_length = None
                    if 'max_length' in value.keys():
                        max_length = value['max_length']
                    column_map[record_key] = (record_key, datatype, replace_key, max_length)
        return column_map
def _parse_columns ( self ) : column_map = { } for key , value in self . model . keyMap . items ( ) : record_key = key [ 1 : ] if record_key : if self . item_key . findall ( record_key ) : pass else : if value [ 'value_datatype' ] == 'map' and not key in self . empty_maps : continue datatype = value [ 'value_datatype' ] if value [ 'value_datatype' ] == 'map' : datatype = 'list' if value [ 'value_datatype' ] == 'number' : datatype = 'float' if 'integer_data' in value . keys ( ) : if value [ 'integer_data' ] : datatype = 'integer' replace_key = '' if 'field_metadata' in value . keys ( ) : if 'replace_key' in value [ 'field_metadata' ] . keys ( ) : if isinstance ( value [ 'field_metadata' ] [ 'replace_key' ] , str ) : replace_key = value [ 'field_metadata' ] [ 'replace_key' ] max_length = None if 'max_length' in value . keys ( ) : max_length = value [ 'max_length' ] column_map [ record_key ] = ( record_key , datatype , replace_key , max_length ) return column_map
a helper method for parsing the column properties from the record schema
a helper method for parsing the column properties from the record schema
''' a helper method for parsing the column properties from the record schema ''' # construct column list # label empty map fields as lists for column determinations
self