Skip to content

Commit

Permalink
Add selectStopProductClassCount
Browse files Browse the repository at this point in the history
  • Loading branch information
ksharma-xyz committed Feb 28, 2025
1 parent 745ca78 commit 414825f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ internal class RealSandook(factory: SandookDriverFactory) : Sandook {
return nswStopsQueries.selectStopsCount().executeAsOne().toInt()
}

override fun productClassCount(): Int {
return nswStopsQueries.selectStopProductClassCount().executeAsOne().toInt()
}

override fun insertNswStopProductClass(stopId: String, productClass: Int) {
nswStopsQueries.insertStopProductClass(stopId, productClass.toLong())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ interface Sandook {

fun stopsCount(): Int

fun productClassCount(): Int

fun insertNswStopProductClass(stopId: String, productClass: Int)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ insertStopProductClass:
INSERT INTO NswStopProductClass(stopId, productClass)
VALUES (?, ?);

-- Select count of items in NswStopProductClass
selectStopProductClassCount:
SELECT COUNT(*) AS totalItems
FROM NswStopProductClass;

clearNswStopsTable:
DELETE FROM NswStops;

Expand Down

0 comments on commit 414825f

Please sign in to comment.