com.squareup.sqldelight.internal.QueryList.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime-common Show documentation
Show all versions of runtime-common Show documentation
Common runtime library to support generated code
The newest version!
package com.squareup.sqldelight.internal
import com.squareup.sqldelight.Query
/**
* TODO: Get rid of if CopyOnWriteArrayList joins kotlin.collections?
*/
class QueryList {
internal var queries: List> = emptyList()
fun addQuery(query: Query<*>) {
synchronized(queries) {
queries += query
}
}
fun removeQuery(query: Query<*>) {
synchronized(queries) {
queries -= query
}
}
operator fun plus(other: QueryList): QueryList {
val result = QueryList()
result.queries = queries + other.queries
return result
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy