Skip to content

Commit

Permalink
CI: Check for changed files (sqldelight#5133)
Browse files Browse the repository at this point in the history
* CI: Check for changed files

* Fix sqldelight-compiler:integration-tests
  • Loading branch information
hfhbd authored Apr 7, 2024
1 parent 4f426e3 commit 0a62baa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ jobs:
if: matrix.os == 'macOS-14' && matrix.job == 'test'
run: ./gradlew iosX64Test --stacktrace --parallel

- name: Check for changed files
run: test -z "$(git status --porcelain)"

verify_intellij:
runs-on: ubuntu-latest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class GroupQueries(

public fun <T : Any> selectFromTable2(mapper: (something: String?, nice: String?) -> T): Query<T>
= Query(-620_576_550, arrayOf("myftstable2"), driver, "Group.sq", "selectFromTable2", """
|SELECT *
|SELECT myftstable2.something, myftstable2.nice
|FROM myftstable2
""".trimMargin()) { cursor ->
mapper(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class PlayerQueries(
shoots: Shoots,
) -> T): Query<T> = Query(-1_634_440_035, arrayOf("player"), driver, "Player.sq", "allPlayers",
"""
|SELECT *
|SELECT player.name, player.number, player.team, player.shoots
|FROM player
""".trimMargin()) { cursor ->
mapper(
Expand Down Expand Up @@ -248,7 +248,7 @@ public class PlayerQueries(
bindString(3, playerAdapter.shootsAdapter.encode(shoots))
}
driver.executeQuery(-452_007_404, """
|SELECT *
|SELECT player.name, player.number, player.team, player.shoots
| FROM player
| WHERE player.rowid = last_insert_rowid()
""".trimMargin(), mapper, 0)
Expand All @@ -271,7 +271,7 @@ public class PlayerQueries(

override fun <R> execute(mapper: (SqlCursor) -> QueryResult<R>): QueryResult<R> =
driver.executeQuery(null, """
|SELECT *
|SELECT player.name, player.number, player.team, player.shoots
|FROM player
|WHERE team ${ if (team == null) "IS" else "=" } ?
""".trimMargin(), mapper, 1) {
Expand All @@ -296,7 +296,7 @@ public class PlayerQueries(
override fun <R> execute(mapper: (SqlCursor) -> QueryResult<R>): QueryResult<R> {
val numberIndexes = createArguments(count = number.size)
return driver.executeQuery(null, """
|SELECT *
|SELECT player.name, player.number, player.team, player.shoots
|FROM player
|WHERE number IN $numberIndexes
""".trimMargin(), mapper, number.size) {
Expand Down Expand Up @@ -324,7 +324,7 @@ public class PlayerQueries(

override fun <R> execute(mapper: (SqlCursor) -> QueryResult<R>): QueryResult<R> =
driver.executeQuery(-1_258_650_806, """
|SELECT *
|SELECT player.name, player.number, player.team, player.shoots
|FROM player
|WHERE (number, name) > (?, ?)
""".trimMargin(), mapper, 2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public class TeamQueries(

override fun <R> execute(mapper: (SqlCursor) -> QueryResult<R>): QueryResult<R> =
driver.executeQuery(null, """
|SELECT *
|SELECT team.name, team.captain, team.inner_type, team.coach
|FROM team
|WHERE inner_type ${ if (inner_type == null) "IS" else "=" } ?
""".trimMargin(), mapper, 1) {
Expand Down

0 comments on commit 0a62baa

Please sign in to comment.