diff --git a/pydbapi/__init__.py b/pydbapi/__init__.py index d3e0838..c89ec5b 100644 --- a/pydbapi/__init__.py +++ b/pydbapi/__init__.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-04 10:58:54 -# @Last Modified time: 2022-08-11 15:09:09 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:06:21 # @github: https://github.com/longfengpili -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - import os import logging.config from pydbapi.conf.settings import LOGGING_CONFIG diff --git a/pydbapi/api/__init__.py b/pydbapi/api/__init__.py index 788e4a0..cbe881e 100644 --- a/pydbapi/api/__init__.py +++ b/pydbapi/api/__init__.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-08 14:02:33 -# @Last Modified time: 2022-11-18 14:58:11 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 17:49:13 # @github: https://github.com/longfengpili -#!/usr/bin/env python3 -# -*- coding:utf-8 -*- - from .redshift import RedshiftDB, SqlRedshiftCompile from .sqlite import SqliteDB, SqliteCompile from .mysql import MysqlDB, SqlMysqlCompile diff --git a/pydbapi/api/mysql.py b/pydbapi/api/mysql.py index 333e0a1..d665da0 100644 --- a/pydbapi/api/mysql.py +++ b/pydbapi/api/mysql.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-10 14:40:50 -# @Last Modified time: 2022-08-11 10:05:16 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 17:49:58 # @github: https://github.com/longfengpili -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - import re import threading import pymysql diff --git a/pydbapi/api/redshift.py b/pydbapi/api/redshift.py index 77eb266..e1f8283 100644 --- a/pydbapi/api/redshift.py +++ b/pydbapi/api/redshift.py @@ -1,13 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-10 14:40:50 -# @Last Modified time: 2022-08-11 10:05:30 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 17:50:05 # @github: https://github.com/longfengpili -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - - import threading import psycopg2 diff --git a/pydbapi/api/snowflake.py b/pydbapi/api/snowflake.py index ee24b6c..4f126e0 100644 --- a/pydbapi/api/snowflake.py +++ b/pydbapi/api/snowflake.py @@ -1,11 +1,9 @@ -# # @Author: chunyang.xu -# # @Email: 398745129@qq.com -# # @Date: 2020-10-22 16:12:47 -# # @Last Modified time: 2022-08-11 10:05:28 -# # @github: https://github.com/longfengpili - -# # !/usr/bin/env python3 -# # -*- coding:utf-8 -*- +# -*- coding: utf-8 -*- +# @Author: chunyang.xu +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:05:45 +# @github: https://github.com/longfengpili # import threading # import snowflake.connector @@ -15,13 +13,6 @@ # from pydbapi.conf import AUTO_RULES -# import logging -# import logging.config -# from pydbapi.conf import LOGGING_CONFIG -# logging.config.dictConfig(LOGGING_CONFIG) -# sflogger = logging.getLogger('snowflake') - - # class SqlSnowflakeCompile(SqlCompile): # '''[summary] diff --git a/pydbapi/api/sqlite.py b/pydbapi/api/sqlite.py index a15d97c..b73c6a5 100644 --- a/pydbapi/api/sqlite.py +++ b/pydbapi/api/sqlite.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-03 15:25:44 -# @Last Modified time: 2022-08-11 10:05:25 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:04:44 # @github: https://github.com/longfengpili -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - import os import threading import sqlite3 diff --git a/pydbapi/api/trino.py b/pydbapi/api/trino.py index 3c4af3a..fbd9aa9 100644 --- a/pydbapi/api/trino.py +++ b/pydbapi/api/trino.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -# @Author: longfengpili -# @Date: 2022-11-14 14:17:02 -# @Last Modified by: longfengpili -# @Last Modified time: 2023-01-13 11:25:26 - +# @Author: chunyang.xu +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:04:50 +# @github: https://github.com/longfengpili import re import tqdm diff --git a/pydbapi/col/__init__.py b/pydbapi/col/__init__.py index 8d42102..61865e0 100644 --- a/pydbapi/col/__init__.py +++ b/pydbapi/col/__init__.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Date: 2021-02-01 19:18:20 +# @Date: 2023-06-02 15:27:41 # @Last Modified by: chunyang.xu -# @Last Modified time: 2021-02-01 19:18:29 - +# @Last Modified time: 2023-07-26 18:04:59 +# @github: https://github.com/longfengpili from .colmodel import ColumnModel, ColumnsModel diff --git a/pydbapi/col/colmodel.py b/pydbapi/col/colmodel.py index 0c0f45a..12a7783 100644 --- a/pydbapi/col/colmodel.py +++ b/pydbapi/col/colmodel.py @@ -1,13 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-11-30 16:28:21 -# @Last Modified time: 2023-06-08 10:30:28 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:05:10 # @github: https://github.com/longfengpili -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - - class ColumnModel(object): def __init__(self, newname, coltype='varchar', sqlexpr=None, func=None, order=0, desc=None): diff --git a/pydbapi/conf/__init__.py b/pydbapi/conf/__init__.py index 0398c97..19872b0 100644 --- a/pydbapi/conf/__init__.py +++ b/pydbapi/conf/__init__.py @@ -1,13 +1,11 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-10 12:18:59 -# @Last Modified time: 2020-06-17 21:08:41 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:05:23 # @github: https://github.com/longfengpili -#!/usr/bin/env python3 -# -*- coding:utf-8 -*- - from .myhandlers import MakeFileHandler -from .settings import * +from .logconf import * # __all__ = ['MakeFileHandler', 'LOGGING_CONFIG', 'AUTO_RULES', 'REDSHIFT_AUTO_RULES'] diff --git a/pydbapi/conf/settings.py b/pydbapi/conf/logconf.py similarity index 97% rename from pydbapi/conf/settings.py rename to pydbapi/conf/logconf.py index a5c1213..bf0574c 100644 --- a/pydbapi/conf/settings.py +++ b/pydbapi/conf/logconf.py @@ -1,137 +1,137 @@ -# @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-10 14:14:53 -# @Last Modified time: 2022-08-11 11:56:34 -# @github: https://github.com/longfengpili - -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - -import re -import os -import sys -import colorlog - -AUTO_RULES = ['test_xu'] # 可以自动执行表名(表名包含即可) -REDSHIFT_AUTO_RULES = AUTO_RULES + ['_data_aniland'] # Amazon Redshift 可以自动执行表名(表名包含即可) - -# logging settings -USERPATH = os.environ['USERPROFILE'] if 'USERPROFILE' in os.environ else os.environ['HOME'] if 'HOME' in os.environ else '' -LOG_BASE_PATH = os.path.join(USERPATH, '.pydbapilog') # 可以user目录下查看日志 -PROJECT_NAME = re.sub(':?\\\\', '_', os.getcwd()) -LOGGING_CONFIG = { - 'version': 1, # 保留字 - 'disable_existing_loggers': False, # 禁用已经存在的logger实例 - # 日志文件的格式 - 'formatters': { - # 详细的日志格式 - 'standard': { - 'format': '%(asctime)s.%(msecs)03d - %(threadName)s:%(thread)d - %(name)s - %(levelname)s - %(pathname)s - %(lineno)d - %(message)s', - 'datefmt': '%Y-%m-%d %H:%M:%S', - }, - # 简单的日志格式 - 'simple': { - 'format': '%(asctime)s.%(msecs)03d - %(threadName)s - %(name)s - %(levelname)s - %(filename)s - %(lineno)d - %(message)s', - 'datefmt': '%Y-%m-%d %H:%M:%S', - }, - # 定义一个特殊的日志格式 - 'collect': { - 'format': '%(message)s' - }, - # color - 'color': { - '()': colorlog.ColoredFormatter, - 'format': '%(asctime)s.%(msecs)03d - %(threadName)s - %(name)s - %(levelname)s - %(filename)s - %(lineno)d - %(log_color)s%(message)s', - 'datefmt': '%Y-%m-%d %H:%M:%S', - 'log_colors': { - 'CRITICAL': 'bold_red', - 'ERROR': 'red', - 'WARNING': 'purple', - 'INFO': 'green', - 'DEBUG': 'yellow' - } - } - }, - # 过滤器 - 'filters': { - }, - # 处理器 - 'handlers': { - # 在终端打印 - 'console': { - 'level': 'DEBUG', - 'filters': [], - 'class': 'logging.StreamHandler', # - 'formatter': 'color' if sys.stdout.isatty() else 'simple' - }, - # 默认的 - 'default': { - 'level': 'INFO', - 'class': 'pydbapi.conf.MakeFileHandler', # 能够判断创建日持文件 - 'filename': os.path.join(LOG_BASE_PATH, f'{PROJECT_NAME}_default.log'), # 日志文件 - 'when': 'd', # 每天备份 - 'interval': 1, - 'backupCount': 30, # 最多备份几个 - 'formatter': 'standard', - 'encoding': 'utf-8', - }, - 'db': { - 'level': 'INFO', - 'class': 'pydbapi.conf.MakeFileHandler', # 保存到文件,自动切 - 'filename': os.path.join(LOG_BASE_PATH, f'{PROJECT_NAME}_db.log'), # 日志文件 - 'when': 'd', # 每小时备份 - 'interval': 1, - 'backupCount': 30, - 'formatter': 'simple', - 'encoding': "utf-8" - }, - 'sql': { - 'level': 'INFO', - 'class': 'logging.handlers.TimedRotatingFileHandler', # 保存到文件,自动切 - 'filename': os.path.join(LOG_BASE_PATH, f'{PROJECT_NAME}_sql.log'), # 日志文件 - 'when': 'd', # 每小时备份 - 'interval': 1, - 'backupCount': 30, - 'formatter': 'simple', - 'encoding': "utf-8" - }, - }, - 'loggers': { - # 默认的logger应用如下配置 - '': { - 'handlers': ['console', 'default'], - 'level': 'INFO', - 'propagate': True, # 向不向更高级别的logger传递 - }, - 'db': { - 'handlers': ['console', 'db'], - 'level': 'INFO', - 'propagate': False, # 向不向更高级别的logger传递 - }, - 'sql': { - 'handlers': ['console', 'sql'], - 'level': 'INFO', - 'propagate': False, # 向不向更高级别的logger传递 - }, - 'redshift': { - 'handlers': ['console', 'db'], - 'level': 'INFO', - 'propagate': False, # 向不向更高级别的logger传递 - }, - 'sqlite': { - 'handlers': ['console', 'db'], - 'level': 'INFO', - 'propagate': False, # 向不向更高级别的logger传递 - }, - 'mysql': { - 'handlers': ['console', 'db'], - 'level': 'INFO', - 'propagate': False, # 向不向更高级别的logger传递 - }, - 'snowflake': { - 'handlers': ['console', 'db'], - 'level': 'INFO', - 'propagate': False, # 向不向更高级别的logger传递 - }, - }, -} +# @Author: chunyang.xu +# @Email: 398745129@qq.com +# @Date: 2020-06-10 14:14:53 +# @Last Modified time: 2022-08-11 11:56:34 +# @github: https://github.com/longfengpili + +# !/usr/bin/env python3 +# -*- coding:utf-8 -*- + +import re +import os +import sys +import colorlog + +AUTO_RULES = ['test_xu'] # 可以自动执行表名(表名包含即可) +REDSHIFT_AUTO_RULES = AUTO_RULES + ['_data_aniland'] # Amazon Redshift 可以自动执行表名(表名包含即可) + +# logging settings +USERPATH = os.environ['USERPROFILE'] if 'USERPROFILE' in os.environ else os.environ['HOME'] if 'HOME' in os.environ else '' +LOG_BASE_PATH = os.path.join(USERPATH, '.pydbapilog') # 可以user目录下查看日志 +PROJECT_NAME = re.sub(':?\\\\', '_', os.getcwd()) +LOGGING_CONFIG = { + 'version': 1, # 保留字 + 'disable_existing_loggers': False, # 禁用已经存在的logger实例 + # 日志文件的格式 + 'formatters': { + # 详细的日志格式 + 'standard': { + 'format': '%(asctime)s.%(msecs)03d - %(threadName)s:%(thread)d - %(name)s - %(levelname)s - %(pathname)s - %(lineno)d - %(message)s', + 'datefmt': '%Y-%m-%d %H:%M:%S', + }, + # 简单的日志格式 + 'simple': { + 'format': '%(asctime)s.%(msecs)03d - %(threadName)s - %(name)s - %(levelname)s - %(filename)s - %(lineno)d - %(message)s', + 'datefmt': '%Y-%m-%d %H:%M:%S', + }, + # 定义一个特殊的日志格式 + 'collect': { + 'format': '%(message)s' + }, + # color + 'color': { + '()': colorlog.ColoredFormatter, + 'format': '%(asctime)s.%(msecs)03d - %(threadName)s - %(name)s - %(levelname)s - %(filename)s - %(lineno)d - %(log_color)s%(message)s', + 'datefmt': '%Y-%m-%d %H:%M:%S', + 'log_colors': { + 'CRITICAL': 'bold_red', + 'ERROR': 'red', + 'WARNING': 'purple', + 'INFO': 'green', + 'DEBUG': 'yellow' + } + } + }, + # 过滤器 + 'filters': { + }, + # 处理器 + 'handlers': { + # 在终端打印 + 'console': { + 'level': 'DEBUG', + 'filters': [], + 'class': 'logging.StreamHandler', # + 'formatter': 'color' if sys.stdout.isatty() else 'simple' + }, + # 默认的 + 'default': { + 'level': 'INFO', + 'class': 'pydbapi.conf.MakeFileHandler', # 能够判断创建日持文件 + 'filename': os.path.join(LOG_BASE_PATH, f'{PROJECT_NAME}_default.log'), # 日志文件 + 'when': 'd', # 每天备份 + 'interval': 1, + 'backupCount': 30, # 最多备份几个 + 'formatter': 'standard', + 'encoding': 'utf-8', + }, + 'db': { + 'level': 'INFO', + 'class': 'pydbapi.conf.MakeFileHandler', # 保存到文件,自动切 + 'filename': os.path.join(LOG_BASE_PATH, f'{PROJECT_NAME}_db.log'), # 日志文件 + 'when': 'd', # 每小时备份 + 'interval': 1, + 'backupCount': 30, + 'formatter': 'simple', + 'encoding': "utf-8" + }, + 'sql': { + 'level': 'INFO', + 'class': 'logging.handlers.TimedRotatingFileHandler', # 保存到文件,自动切 + 'filename': os.path.join(LOG_BASE_PATH, f'{PROJECT_NAME}_sql.log'), # 日志文件 + 'when': 'd', # 每小时备份 + 'interval': 1, + 'backupCount': 30, + 'formatter': 'simple', + 'encoding': "utf-8" + }, + }, + 'loggers': { + # 默认的logger应用如下配置 + '': { + 'handlers': ['console', 'default'], + 'level': 'INFO', + 'propagate': True, # 向不向更高级别的logger传递 + }, + 'db': { + 'handlers': ['console', 'db'], + 'level': 'INFO', + 'propagate': False, # 向不向更高级别的logger传递 + }, + 'sql': { + 'handlers': ['console', 'sql'], + 'level': 'INFO', + 'propagate': False, # 向不向更高级别的logger传递 + }, + 'redshift': { + 'handlers': ['console', 'db'], + 'level': 'INFO', + 'propagate': False, # 向不向更高级别的logger传递 + }, + 'sqlite': { + 'handlers': ['console', 'db'], + 'level': 'INFO', + 'propagate': False, # 向不向更高级别的logger传递 + }, + 'mysql': { + 'handlers': ['console', 'db'], + 'level': 'INFO', + 'propagate': False, # 向不向更高级别的logger传递 + }, + 'snowflake': { + 'handlers': ['console', 'db'], + 'level': 'INFO', + 'propagate': False, # 向不向更高级别的logger传递 + }, + }, +} diff --git a/pydbapi/conf/myhandlers.py b/pydbapi/conf/myhandlers.py index 74cc913..edc8b82 100644 --- a/pydbapi/conf/myhandlers.py +++ b/pydbapi/conf/myhandlers.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-08 16:42:55 -# @Last Modified time: 2021-03-26 14:43:20 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:05:56 # @github: https://github.com/longfengpili -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - import logging.handlers import os import errno diff --git a/pydbapi/db/__init__.py b/pydbapi/db/__init__.py index b25d0c5..da1fa7a 100644 --- a/pydbapi/db/__init__.py +++ b/pydbapi/db/__init__.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-03 10:31:52 -# @Last Modified time: 2022-08-11 10:05:45 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:06:06 # @github: https://github.com/longfengpili -#!/usr/bin/env python3 -# -*- coding:utf-8 -*- - from .base import DBMixin from .fileexec import DBFileExec diff --git a/pydbapi/db/base.py b/pydbapi/db/base.py index 59f904f..3d16273 100644 --- a/pydbapi/db/base.py +++ b/pydbapi/db/base.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-02 18:46:58 -# @Last Modified time: 2023-01-13 11:25:44 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:06:11 # @github: https://github.com/longfengpili -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - import re import pandas as pd from tqdm import tqdm diff --git a/pydbapi/db/fileexec.py b/pydbapi/db/fileexec.py index 29c18b6..542baa7 100644 --- a/pydbapi/db/fileexec.py +++ b/pydbapi/db/fileexec.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-08 11:55:54 -# @Last Modified time: 2022-11-25 15:32:02 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:06:17 # @github: https://github.com/longfengpili -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - import os import time diff --git a/setup.py b/setup.py index de4d050..adb5e21 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-09 16:46:54 -# @Last Modified time: 2023-02-10 15:20:29 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:19:32 # @github: https://github.com/longfengpili - -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - +# import os import sys import shutil diff --git a/tests/__init__.py b/tests/__init__.py index 6cf58ff..ec85ac5 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,8 +1,6 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-11 12:04:43 -# @Last Modified time: 2020-06-11 12:05:04 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:19:23 # @github: https://github.com/longfengpili - -#!/usr/bin/env python3 -# -*- coding:utf-8 -*- diff --git a/tests/base/__init__.py b/tests/base/__init__.py index d6379fe..f59ba30 100644 --- a/tests/base/__init__.py +++ b/tests/base/__init__.py @@ -1,8 +1,6 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-11 15:43:50 -# @Last Modified time: 2020-06-11 15:44:39 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:06:34 # @github: https://github.com/longfengpili - -#!/usr/bin/env python3 -# -*- coding:utf-8 -*- diff --git a/tests/base/db_test.py b/tests/base/db_test.py index 01ccb65..07c6a24 100644 --- a/tests/base/db_test.py +++ b/tests/base/db_test.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-03 10:36:14 -# @Last Modified time: 2021-11-16 17:06:12 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:06:48 # @github: https://github.com/longfengpili -#!/usr/bin/env python3 -# -*- coding:utf-8 -*- - import pytest from pydbapi.sql import SqlParse diff --git a/tests/colmodel/__init__.py b/tests/colmodel/__init__.py index 39af4c7..20f716c 100644 --- a/tests/colmodel/__init__.py +++ b/tests/colmodel/__init__.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Date: 2021-09-24 12:09:53 +# @Date: 2023-06-02 15:27:41 # @Last Modified by: chunyang.xu -# @Last Modified time: 2021-09-24 12:09:56 +# @Last Modified time: 2023-07-26 18:06:59 +# @github: https://github.com/longfengpili diff --git a/tests/colmodel/test_colmodel.py b/tests/colmodel/test_colmodel.py index 946fcaa..7ec2fef 100644 --- a/tests/colmodel/test_colmodel.py +++ b/tests/colmodel/test_colmodel.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Date: 2021-09-24 12:10:12 -# @Last Modified by: longfengpili -# @Last Modified time: 2023-06-08 10:28:51 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:07:04 +# @github: https://github.com/longfengpili from pydbapi.col import ColumnModel, ColumnsModel diff --git a/tests/mysql/__init__.py b/tests/mysql/__init__.py index 03ee5de..a88d847 100644 --- a/tests/mysql/__init__.py +++ b/tests/mysql/__init__.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Date: 2021-03-08 14:58:00 +# @Date: 2023-06-02 15:27:41 # @Last Modified by: chunyang.xu -# @Last Modified time: 2021-03-08 14:58:01 +# @Last Modified time: 2023-07-26 18:07:35 +# @github: https://github.com/longfengpili diff --git a/tests/mysql/mysql_test.py b/tests/mysql/mysql_test.py index d09260b..a3c3fec 100644 --- a/tests/mysql/mysql_test.py +++ b/tests/mysql/mysql_test.py @@ -1,9 +1,9 @@ - # -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Date: 2021-03-08 14:19:01 +# @Date: 2023-06-02 15:27:41 # @Last Modified by: chunyang.xu -# @Last Modified time: 2022-08-11 11:25:41 +# @Last Modified time: 2023-07-26 18:18:18 +# @github: https://github.com/longfengpili import os import pytest @@ -13,7 +13,7 @@ from pydbapi.api.mysql import SqlMysqlCompile # 如果需要日期,请打开 -# from pydbapi.conf.settings import LOGGING_CONFIG +# from pydbapi.conf.logconf import LOGGING_CONFIG # import logging.config # logging.config.dictConfig(LOGGING_CONFIG) diff --git a/tests/sql/__init__.py b/tests/sql/__init__.py index d40b5ab..42da8a4 100644 --- a/tests/sql/__init__.py +++ b/tests/sql/__init__.py @@ -1,8 +1,6 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-11-30 18:16:44 -# @Last Modified time: 2020-11-30 18:16:47 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:18:27 # @github: https://github.com/longfengpili - -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- diff --git a/tests/sql/col_test.py b/tests/sql/col_test.py index ad6f490..a835ff2 100644 --- a/tests/sql/col_test.py +++ b/tests/sql/col_test.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-11-30 18:16:59 -# @Last Modified time: 2021-02-01 19:24:53 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:18:32 # @github: https://github.com/longfengpili -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - from pydbapi.col import ColumnModel, ColumnsModel diff --git a/tests/sql/sqlcompile_test.py b/tests/sql/sqlcompile_test.py index 6757d19..81be81e 100644 --- a/tests/sql/sqlcompile_test.py +++ b/tests/sql/sqlcompile_test.py @@ -1,13 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-11-30 18:43:01 -# @Last Modified time: 2021-02-01 19:27:10 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:18:37 # @github: https://github.com/longfengpili -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - - from pydbapi.col import ColumnModel, ColumnsModel from pydbapi.sql import SqlCompile diff --git a/tests/sql/sqlfileparse_test.py b/tests/sql/sqlfileparse_test.py index 92b5cfc..eeac442 100644 --- a/tests/sql/sqlfileparse_test.py +++ b/tests/sql/sqlfileparse_test.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-04 17:45:04 -# @Last Modified time: 2022-11-25 15:25:18 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:18:41 # @github: https://github.com/longfengpili -#!/usr/bin/env python3 -# -*- coding:utf-8 -*- - import os import pytest diff --git a/tests/sqlite/__init__.py b/tests/sqlite/__init__.py index ad3c6c7..823ddf3 100644 --- a/tests/sqlite/__init__.py +++ b/tests/sqlite/__init__.py @@ -1,8 +1,6 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-11 15:44:31 -# @Last Modified time: 2020-06-11 15:44:31 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:18:52 # @github: https://github.com/longfengpili - -#!/usr/bin/env python3 -# -*- coding:utf-8 -*- diff --git a/tests/sqlite/sqlite_test.py b/tests/sqlite/sqlite_test.py index 5bf34e9..f01d2dd 100644 --- a/tests/sqlite/sqlite_test.py +++ b/tests/sqlite/sqlite_test.py @@ -1,12 +1,10 @@ +# -*- coding: utf-8 -*- # @Author: chunyang.xu -# @Email: 398745129@qq.com -# @Date: 2020-06-03 15:58:41 -# @Last Modified time: 2022-08-11 15:10:38 +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:18:59 # @github: https://github.com/longfengpili -# !/usr/bin/env python3 -# -*- coding:utf-8 -*- - import os import pytest from pydbapi.col import ColumnModel, ColumnsModel diff --git a/tests/trino/__init__.py b/tests/trino/__init__.py index 42d112c..1034f33 100644 --- a/tests/trino/__init__.py +++ b/tests/trino/__init__.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# @Author: longfengpili -# @Date: 2022-11-14 14:35:12 -# @Last Modified by: longfengpili -# @Last Modified time: 2022-11-14 14:35:12 +# @Author: chunyang.xu +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:19:08 +# @github: https://github.com/longfengpili diff --git a/tests/trino/test_trino.py b/tests/trino/test_trino.py index 330fbcc..dac966b 100644 --- a/tests/trino/test_trino.py +++ b/tests/trino/test_trino.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# @Author: longfengpili -# @Date: 2022-11-14 14:25:01 -# @Last Modified by: longfengpili -# @Last Modified time: 2022-11-18 15:15:50 +# @Author: chunyang.xu +# @Date: 2023-06-02 15:27:41 +# @Last Modified by: chunyang.xu +# @Last Modified time: 2023-07-26 18:19:19 +# @github: https://github.com/longfengpili import sys @@ -16,7 +17,7 @@ from pydbapi.api.trino import SqlTrinoCompile # 如果需要日期,请打开 -# from pydbapi.conf.settings import LOGGING_CONFIG +# from pydbapi.conf.logconf import LOGGING_CONFIG # import logging.config # logging.config.dictConfig(LOGGING_CONFIG)