• R/O
  • SSH

execsql: コミット

Default repository for execsql.py


コミットメタ情報

リビジョンc0df44163453b04eefa4b6257b6b033a8fa05748 (tree)
日時2023-03-31 06:48:38
作者Dreas Nielsen <dnielsen@inte...>
コミッターDreas Nielsen

ログメッセージ

Undid change to COPY command for TSV data.

変更サマリ

差分

diff -r a1b18f324005 -r c0df44163453 execsql/execsql.py
--- a/execsql/execsql.py Wed Mar 29 13:49:41 2023 -0700
+++ b/execsql/execsql.py Thu Mar 30 14:48:38 2023 -0700
@@ -27,12 +27,12 @@
2727 #
2828 # ===============================================================================
2929
30-__version__ = "1.113.1"
31-__vdate = "2023-03-29"
30+__version__ = "1.113.2"
31+__vdate = "2023-03-30"
3232
3333 primary_vno = 1
3434 secondary_vno = 113
35-tertiary_vno = 1
35+tertiary_vno = 2
3636
3737 import os
3838 import os.path
@@ -4158,13 +4158,10 @@
41584158 # Copy_from() requires a delimiter, but if there is none, feed it an
41594159 # ASCII unit separator, which, if it had been used for its intended purpose,
41604160 # should have been identified as the delimiter, so presumably it has not been used.
4161- if csv_file_obj.delimiter == '\t' and csv_file_obj.quotechar is None:
4162- copy_cmd = "copy %s (%s) from stdin with (format text, null ''" % (sq_name, input_col_list)
4163- else:
4164- delim = csv_file_obj.delimiter if csv_file_obj.delimiter else chr(31)
4165- copy_cmd = "copy %s (%s) from stdin with (format csv, null '', delimiter '%s'" % (sq_name, input_col_list, delim)
4166- if csv_file_obj.quotechar:
4167- copy_cmd = copy_cmd + ", quote '%s'" % csv_file_obj.quotechar
4161+ delim = csv_file_obj.delimiter if csv_file_obj.delimiter else chr(31)
4162+ copy_cmd = "copy %s (%s) from stdin with (format csv, null '', delimiter '%s'" % (sq_name, input_col_list, delim)
4163+ if csv_file_obj.quotechar:
4164+ copy_cmd = copy_cmd + ", quote '%s'" % csv_file_obj.quotechar
41684165 # psycopg2 or Postgres does not always do the encoding conversion correctly.
41694166 #if input_enc != self.encoding:
41704167 # copy_cmd = copy_cmd + ", encoding '%s'" % input_enc
diff -r a1b18f324005 -r c0df44163453 setup.py
--- a/setup.py Wed Mar 29 13:49:41 2023 -0700
+++ b/setup.py Thu Mar 30 14:48:38 2023 -0700
@@ -5,7 +5,7 @@
55 long_description = f.read()
66
77 setuptools.setup(name='execsql',
8- version='1.113.1',
8+ version='1.113.2',
99 description="Runs a SQL script against a PostgreSQL, MS-Access, SQLite, MS-SQL-Server, MySQL, MariaDB, Firebird, or Oracle database, or an ODBC DSN. Provides metacommands to import and export data, copy data between databases, conditionally execute SQL and metacommands, and dynamically alter SQL and metacommands with substitution variables. Data can be exported in 18 different formats, including CSV, TSV, ODS, HTML, JSON, LaTeX, and Markdown tables, and using custom templates.",
1010 author='Dreas Nielsen',
1111 author_email='dreas.nielsen@gmail.com',
旧リポジトリブラウザで表示