Skip to content

Introduce Fine-grained Control over Generated Operations#8

Merged
teogor merged 1 commit intomainfrom
feature/raw-operation-annotation
Feb 15, 2024
Merged

Introduce Fine-grained Control over Generated Operations#8
teogor merged 1 commit intomainfrom
feature/raw-operation-annotation

Conversation

@teogor
Copy link
Copy Markdown
Owner

@teogor teogor commented Feb 15, 2024

Generating Operations:

To generate an operation for a DAO method, annotate it with @RawOperation:

@Dao
interface SavedGameDao {
  @RawOperation
  @Query("SELECT * FROM saved_games")
  fun getAll(): Flow<List<SavedGame>>
}

Configuration:

Enable and configure these features using either KSP arguments or the dev.teogor.stitch Gradle plugin:

1. KSP Arguments:

ksp {
  arg("stitch.enableOperationGeneration", "true")
  arg("stitch.operationGenerationLevel", "explicit")
}

2. dev.teogor.stitch Gradle Plugin:

apply plugin: "dev.teogor.stitch"

stitch {
  enableOperationGeneration = true
  operationGenerationLevel = OperationGenerationLevel.EXPLICIT
}

Detailed explanations for configuration properties are available in the plugin documentation.

@teogor teogor added @priority-medium @feature New feature or request labels Feb 15, 2024
@teogor teogor added this to the 1.0.0-alpha02 milestone Feb 15, 2024
@teogor teogor self-assigned this Feb 15, 2024
@teogor teogor merged commit 08648af into main Feb 15, 2024
@zeobot zeobot Bot deleted the feature/raw-operation-annotation branch February 15, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@feature New feature or request @priority-medium

Projects

Development

Successfully merging this pull request may close these issues.

1 participant