From d3484344eb89ae6ebe4c5274efe3e508507a6a68 Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Wed, 25 Mar 2026 23:19:43 +0000 Subject: [PATCH 1/3] =?UTF-8?q?GetStationsByName=20RPC=E3=81=AE=E3=83=91?= =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=83=9E=E3=83=B3=E3=82=B9=E6=94=B9?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- stationapi/src/use_case/interactor/query.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stationapi/src/use_case/interactor/query.rs b/stationapi/src/use_case/interactor/query.rs index bc0d770b..29a914cc 100644 --- a/stationapi/src/use_case/interactor/query.rs +++ b/stationapi/src/use_case/interactor/query.rs @@ -269,7 +269,7 @@ where .await?; let stations = self - .update_station_vec_with_attributes(stations, None, transport_type, false) + .update_station_vec_with_attributes(stations, None, transport_type, true) .await?; Ok(stations) From 072a261c5b25e2597c8bde8ee4b7c0c5e6d7c0dd Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Wed, 25 Mar 2026 23:29:05 +0000 Subject: [PATCH 2/3] =?UTF-8?q?GetStationsByName=20RPC=E3=81=AE=E3=83=91?= =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=83=9E=E3=83=B3=E3=82=B9=E6=94=B9?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit enrichmentフェーズでskip_types_join=trueに変更し、不要なstation_station_types/types テーブルへのLEFT JOINを除去。バス停クエリも並列実行に変更。 _no_typesバリアントではline_group_cdをサブクエリで取得し、has_train_typesが 正しく設定されるよう対応。 Co-Authored-By: Claude Opus 4.6 (1M context) --- stationapi/src/infrastructure/station_repository.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stationapi/src/infrastructure/station_repository.rs b/stationapi/src/infrastructure/station_repository.rs index 53d3da01..5ecfb6b9 100644 --- a/stationapi/src/infrastructure/station_repository.rs +++ b/stationapi/src/infrastructure/station_repository.rs @@ -1343,7 +1343,7 @@ impl InternalStationRepository { COALESCE(l.average_distance, 0.0)::DOUBLE PRECISION AS average_distance, NULL::int AS sst_id, NULL::int AS type_cd, - NULL::int AS line_group_cd, + (SELECT sst.line_group_cd FROM station_station_types sst WHERE sst.station_cd = s.station_cd AND sst.line_group_cd IS NOT NULL LIMIT 1)::int AS line_group_cd, NULL::int AS pass, NULL::int AS type_id, NULL::text AS type_name, From 4b4eed2200a78f806f3c093502c9b7ab6c818a38 Mon Sep 17 00:00:00 2001 From: Tsubasa SEKIGUCHI Date: Wed, 25 Mar 2026 23:51:19 +0000 Subject: [PATCH 3/3] =?UTF-8?q?find=5Fstation=5Fby=5Fid,=20get=5Fstations?= =?UTF-8?q?=5Fby=5Fid=5Fvec,=20get=5Fstations=5Fby=5Fcoordinates=E3=81=AE?= =?UTF-8?q?=E3=83=91=E3=83=95=E3=82=A9=E3=83=BC=E3=83=9E=E3=83=B3=E3=82=B9?= =?UTF-8?q?=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit line_group_id=None固定の3つのRPCでもskip_types_join=trueに変更し、 不要なstation_station_types/typesテーブルへのLEFT JOINを除去。 Co-Authored-By: Claude Opus 4.6 (1M context) --- stationapi/src/use_case/interactor/query.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stationapi/src/use_case/interactor/query.rs b/stationapi/src/use_case/interactor/query.rs index 29a914cc..864c7770 100644 --- a/stationapi/src/use_case/interactor/query.rs +++ b/stationapi/src/use_case/interactor/query.rs @@ -72,7 +72,7 @@ where return Ok(None); } let stations = self - .update_station_vec_with_attributes(vec![station], None, transport_type, false) + .update_station_vec_with_attributes(vec![station], None, transport_type, true) .await?; Ok(stations.into_iter().next()) @@ -89,7 +89,7 @@ where .filter(|s| matches_transport_filter(s.transport_type, transport_type)) .collect(); let stations = self - .update_station_vec_with_attributes(stations, None, transport_type, false) + .update_station_vec_with_attributes(stations, None, transport_type, true) .await?; Ok(stations) @@ -161,7 +161,7 @@ where .await?; let stations = self - .update_station_vec_with_attributes(stations, None, transport_type, false) + .update_station_vec_with_attributes(stations, None, transport_type, true) .await?; Ok(stations)