dataimport.py
changeset 10078 5eeffcfde1ba
parent 10007 727bbb361ed1
child 10091 09878c2f8621
equal deleted inserted replaced
10077:1a28c0b0a0b4 10078:5eeffcfde1ba
   363 
   363 
   364 def _execmany_thread_copy_from(cu, statement, data, table,
   364 def _execmany_thread_copy_from(cu, statement, data, table,
   365                                columns, encoding='utf-8'):
   365                                columns, encoding='utf-8'):
   366     """ Execute thread with copy from
   366     """ Execute thread with copy from
   367     """
   367     """
   368     buf = _create_copyfrom_buffer(data, columns, encoding)
   368     buf = _create_copyfrom_buffer(data, columns, encoding=encoding)
   369     if buf is None:
   369     if buf is None:
   370         _execmany_thread_not_copy_from(cu, statement, data)
   370         _execmany_thread_not_copy_from(cu, statement, data)
   371     else:
   371     else:
   372         if columns is None:
   372         if columns is None:
   373             cu.copy_from(buf, table, null='NULL')
   373             cu.copy_from(buf, table, null='NULL')