Skip to content

Commit 63220f2

Browse files
committed
fix: translation
1 parent 19a5f33 commit 63220f2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Diff for: vnpy_postgresql/postgresql_database.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939

4040
class DbBarData(Model):
41-
"""K-Line Data Table Mapping Objects"""
41+
"""Bar Data Table Mapping Objects"""
4242

4343
id: AutoField = AutoField()
4444

@@ -115,7 +115,7 @@ class Meta:
115115

116116

117117
class DbBarOverview(Model):
118-
"""K-Line Summary Data Table Mapping Objects"""
118+
"""Bar Summary Data Table Mapping Objects"""
119119

120120
id: AutoField = AutoField()
121121

@@ -157,7 +157,7 @@ def __init__(self) -> None:
157157
self.db.create_tables([DbBarData, DbTickData, DbBarOverview, DbTickOverview])
158158

159159
def save_bar_data(self, bars: List[BarData], stream: bool = False) -> bool:
160-
"""Save K-Line Data"""
160+
"""Save Bar Data"""
161161
# Read the primary key parameters
162162
bar: BarData = bars[0]
163163
symbol: str = bar.symbol
@@ -198,7 +198,7 @@ def save_bar_data(self, bars: List[BarData], stream: bool = False) -> bool:
198198
),
199199
).execute()
200200

201-
# Updated K-line summary data
201+
# Updated bar summary data
202202
overview: DbBarOverview = DbBarOverview.get_or_none(
203203
DbBarOverview.symbol == symbol,
204204
DbBarOverview.exchange == exchange.value,
@@ -343,7 +343,7 @@ def load_bar_data(
343343
start: datetime,
344344
end: datetime,
345345
) -> List[BarData]:
346-
"""Read K-line data"""
346+
"""Read bar data"""
347347
s: ModelSelect = (
348348
DbBarData.select()
349349
.where(
@@ -439,15 +439,15 @@ def load_tick_data(
439439
def delete_bar_data(
440440
self, symbol: str, exchange: Exchange, interval: Interval
441441
) -> int:
442-
"""Delete K-line data"""
442+
"""Delete bar data"""
443443
d: ModelDelete = DbBarData.delete().where(
444444
(DbBarData.symbol == symbol)
445445
& (DbBarData.exchange == exchange.value)
446446
& (DbBarData.interval == interval.value)
447447
)
448448
count: int = d.execute()
449449

450-
# Delete K-line summary data
450+
# Delete bar summary data
451451
d2: ModelDelete = DbBarOverview.delete().where(
452452
(DbBarOverview.symbol == symbol)
453453
& (DbBarOverview.exchange == exchange.value)
@@ -473,8 +473,8 @@ def delete_tick_data(self, symbol: str, exchange: Exchange) -> int:
473473
return count
474474

475475
def get_bar_overview(self) -> List[BarOverview]:
476-
"""Query the K-line summary information in the database"""
477-
# If there is already a K-line, but summary information is missing, perform initialization
476+
"""Query the bar summary information in the database"""
477+
# If there is already a bar, but summary information is missing, perform initialization
478478
data_count: int = DbBarData.select().count()
479479
overview_count: int = DbBarOverview.select().count()
480480
if data_count and not overview_count:
@@ -498,7 +498,7 @@ def get_tick_overview(self) -> List[TickOverview]:
498498
return overviews
499499

500500
def init_bar_overview(self) -> None:
501-
"""Initialize the K-line summary information in the database"""
501+
"""Initialize the bar summary information in the database"""
502502
s: ModelSelect = DbBarData.select(
503503
DbBarData.symbol,
504504
DbBarData.exchange,

0 commit comments

Comments
 (0)