From 9e682efe3451095e6ac794cfbc937ea30f11603b Mon Sep 17 00:00:00 2001 From: Thibault Derousseaux <6574550+tibdex@users.noreply.github.com> Date: Mon, 24 Jul 2023 15:13:16 -0400 Subject: [PATCH] Shorten data types access (#219) --- app/create_and_join_tables.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/create_and_join_tables.py b/app/create_and_join_tables.py index 8f02a14..9064e99 100644 --- a/app/create_and_join_tables.py +++ b/app/create_and_join_tables.py @@ -13,9 +13,9 @@ def create_station_status_table(session: tt.Session, /) -> None: StationStatusTableColumn.BIKE_TYPE.value, ], types={ - StationStatusTableColumn.STATION_ID.value: tt.type.LONG, - StationStatusTableColumn.BIKE_TYPE.value: tt.type.STRING, - StationStatusTableColumn.BIKES.value: tt.type.INT, + StationStatusTableColumn.STATION_ID.value: tt.LONG, + StationStatusTableColumn.BIKE_TYPE.value: tt.STRING, + StationStatusTableColumn.BIKES.value: tt.INT, }, ) @@ -27,14 +27,14 @@ def create_station_details_table(session: tt.Session, /) -> None: StationDetailsTableColumn.ID.value, ], types={ - StationDetailsTableColumn.ID.value: tt.type.LONG, - StationDetailsTableColumn.NAME.value: tt.type.STRING, - StationDetailsTableColumn.DEPARTMENT.value: tt.type.STRING, - StationDetailsTableColumn.CITY.value: tt.type.STRING, - StationDetailsTableColumn.POSTCODE.value: tt.type.INT, - StationDetailsTableColumn.STREET.value: tt.type.STRING, - StationDetailsTableColumn.HOUSE_NUMBER.value: tt.type.STRING, - StationDetailsTableColumn.CAPACITY.value: tt.type.INT, + StationDetailsTableColumn.ID.value: tt.LONG, + StationDetailsTableColumn.NAME.value: tt.STRING, + StationDetailsTableColumn.DEPARTMENT.value: tt.STRING, + StationDetailsTableColumn.CITY.value: tt.STRING, + StationDetailsTableColumn.POSTCODE.value: tt.INT, + StationDetailsTableColumn.STREET.value: tt.STRING, + StationDetailsTableColumn.HOUSE_NUMBER.value: tt.STRING, + StationDetailsTableColumn.CAPACITY.value: tt.INT, }, default_values={StationDetailsTableColumn.POSTCODE.value: 0}, )