Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB: Add NSW stops tables and queries #627

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Feb 22, 2025

TL;DR

Added NSW stops database tables and related queries to support stop location functionality.

What changed?

  • Created new tables NswStops and NswStopProductClass to store stop information and their associated product classes
  • Added SQL queries for inserting and selecting stops based on name and product class filters
  • Implemented new Sandook interface methods for managing NSW stops data
  • Added migration script for version 2 to create the new tables
  • Added documentation for generating Kotlin files from SQL tables

How to test?

  1. Run ./gradlew generateCommonMainKrailSandookInterface to generate updated Kotlin files
  2. Verify the new tables are created by:
    • Inserting a stop using insertNswStop
    • Adding product classes with insertNswStopProductClass
    • Querying stops using the new select methods
  3. Test different stop search scenarios:
    • Partial name matching
    • Filtering by included product classes
    • Filtering by excluded product classes

Why make this change?

To support the storage and retrieval of NSW transport stop locations and their associated transport modes (product classes), enabling location-based features and stop searching functionality in the KRAIL app.

Copy link
Owner Author

ksharma-xyz commented Feb 22, 2025

@ksharma-xyz ksharma-xyz changed the title Add NSWStops table and necessary migrations DB: Add NSW stops tables and queries Feb 22, 2025
@ksharma-xyz ksharma-xyz marked this pull request as ready for review February 22, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant