equal
deleted
inserted
replaced
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') |