-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c61504
commit a448a8b
Showing
7 changed files
with
3 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
#!/usr/bin/env python | ||
# -*- coding:utf-8 -*- | ||
# | ||
# Author : XueWeiHan | ||
# E-mail : [email protected] | ||
# Date : 2024-05-29 14:28 | ||
# Desc : SQLAlchemy 引擎和 OceanBase 基表定义 | ||
from contextlib import contextmanager | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
#!/usr/bin/env python | ||
# -*- coding:utf-8 -*- | ||
# | ||
# Author : XueWeiHan | ||
# E-mail : [email protected] | ||
# Date : 2024-05-29 14:28 | ||
# Desc : 配置文件 | ||
|
||
|
@@ -15,7 +13,7 @@ def oceanbase_db_url(): | |
username = 'root' | ||
password = '' | ||
host = 'localhost' | ||
port = '3306' | ||
port = '2881' | ||
database = 'test' | ||
db_url = 'mysql+pymysql://{username}:{password}@{host}:{port}/{database}'.format( | ||
username=username, password=password, host=host, port=port, database=database) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
#!/usr/bin/env python | ||
# -*- coding:utf-8 -*- | ||
# | ||
# Author : XueWeiHan | ||
# E-mail : [email protected] | ||
# Date : 2024-05-29 14:28 | ||
# Desc : 操作表的数据 | ||
from sqlalchemy.orm import Session | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
#!/usr/bin/env python | ||
# -*- coding:utf-8 -*- | ||
# | ||
# Author : XueWeiHan | ||
# E-mail : [email protected] | ||
# Date : 2024-05-29 14:28 | ||
# Desc : 配置文件 | ||
from sqlalchemy import Column, Integer, VARCHAR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# -*- coding:utf-8 -*- | ||
# | ||
# Author : XueWeiHan | ||
# E-mail : [email protected] | ||
# Date : 2024-05-29 14:28 | ||
# Desc : 运行入口 | ||
from db.base import get_db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters