Skip to content

Commit bdde9be

Browse files
committed
refactor: removed ModelQL (v1) from ModelClientV2
It was never implemented and usages of it were throwing exceptions so it's not a breaking change.
1 parent edc8edc commit bdde9be

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

model-client/src/commonMain/kotlin/org/modelix/model/client2/IModelClientV2.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import org.modelix.model.IVersion
1717
import org.modelix.model.api.IIdGenerator
1818
import org.modelix.model.lazy.BranchReference
1919
import org.modelix.model.lazy.RepositoryId
20-
import org.modelix.model.server.api.ModelQuery
2120

2221
/**
2322
* This interface is meant exclusively for model client usage.
@@ -53,8 +52,6 @@ interface IModelClientV2 {
5352
suspend fun push(branch: BranchReference, version: IVersion, baseVersion: IVersion?): IVersion
5453

5554
suspend fun pull(branch: BranchReference, lastKnownVersion: IVersion?): IVersion
56-
suspend fun pull(branch: BranchReference, lastKnownVersion: IVersion?, filter: ModelQuery): IVersion
5755

5856
suspend fun poll(branch: BranchReference, lastKnownVersion: IVersion?): IVersion
59-
suspend fun poll(branch: BranchReference, lastKnownVersion: IVersion?, filter: ModelQuery): IVersion
6057
}

model-client/src/commonMain/kotlin/org/modelix/model/client2/ModelClientV2.kt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import org.modelix.model.lazy.RepositoryId
4343
import org.modelix.model.lazy.computeDelta
4444
import org.modelix.model.persistent.HashUtil
4545
import org.modelix.model.persistent.MapBasedStore
46-
import org.modelix.model.server.api.ModelQuery
4746
import org.modelix.model.server.api.v2.VersionDelta
4847
import kotlin.time.Duration.Companion.seconds
4948

@@ -183,14 +182,6 @@ class ModelClientV2(
183182
return receivedVersion
184183
}
185184

186-
override suspend fun pull(branch: BranchReference, lastKnownVersion: IVersion?, filter: ModelQuery): IVersion {
187-
TODO("Not yet implemented")
188-
}
189-
190-
override suspend fun poll(branch: BranchReference, lastKnownVersion: IVersion?, filter: ModelQuery): IVersion {
191-
TODO("Not yet implemented")
192-
}
193-
194185
override fun close() {
195186
httpClient.close()
196187
}

model-client/src/commonMain/kotlin/org/modelix/model/client2/ReplicatedModel.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ import org.modelix.model.lazy.BranchReference
2020
import org.modelix.model.lazy.CLTree
2121
import org.modelix.model.lazy.CLVersion
2222
import org.modelix.model.operations.OTBranch
23-
import org.modelix.model.server.api.ModelQuery
2423

2524
class ReplicatedModel(
2625
val client: IModelClientV2,
2726
val branchRef: BranchReference,
2827
private val providedScope: CoroutineScope? = null,
29-
@Deprecated("was never supported")
30-
val query: ModelQuery? = null,
3128
) {
3229
private val scope = providedScope ?: CoroutineScope(Dispatchers.Default)
3330
private var state = State.New
@@ -174,11 +171,6 @@ fun IModelClientV2.getReplicatedModel(branchRef: BranchReference, scope: Corouti
174171
return ReplicatedModel(this, branchRef, scope)
175172
}
176173

177-
@Deprecated("ModelQuery is not supported and ignored", ReplaceWith("getReplicatedModel(branchRef)"))
178-
fun IModelClientV2.getReplicatedModel(branchRef: BranchReference, query: ModelQuery?): ReplicatedModel {
179-
return ReplicatedModel(this, branchRef, providedScope = null, query = query)
180-
}
181-
182174
/**
183175
* Manages the locks during the creation and merge of versions.
184176
*/

0 commit comments

Comments
 (0)