Commit bff19611 authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

include requery into project

parent 9d37b967
......@@ -130,6 +130,12 @@ dependencies {
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.14.0'
//Sql - Requery
implementation "io.requery:requery:$requeryVersion"
implementation "io.requery:requery-android:$requeryVersion"
implementation "io.requery:requery-kotlin:$requeryVersion"
kapt "io.requery:requery-processor:$requeryVersion"
//Tests
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
......
package com.biganto.visual.roompark.data.repository.db
/**
* Created by Vladislav Bogdashkin on 29.10.2019.
*/
interface IDb {
}
\ No newline at end of file
package com.biganto.visual.roompark.data.repository.db.requrey
import com.biganto.visual.roompark.data.repository.db.IDb
import io.requery.Persistable
import io.requery.reactivex.KotlinReactiveEntityStore
import timber.log.Timber
import javax.inject.Inject
import javax.inject.Singleton
/**
* Created by Vladislav Bogdashkin on 13.06.2018.
*/
@Singleton
class RequeryRepository @Inject constructor(
private val store: KotlinReactiveEntityStore<Persistable>
)
: IDb {
}
\ No newline at end of file
package com.biganto.visual.roompark.data.repository.db.requrey
/**
* Created by Vladislav Bogdashkin on 15.06.2018.
*/
private fun revisionStringToString(revisionString:String):String
{val ind = revisionString.indexOf('?'); return if (ind>0) (revisionString.substring(0,ind)) else revisionString } //remove revision flag
private fun revisionStringToRevision(revisionString:String):String?
{val ind = revisionString.indexOf('?'); return if (ind>0) (revisionString.substring(ind)) else null} //remove revision flag
class RevisionString(private val value:String, private val revision:String?){
constructor(revisionString:String) : this(
value= revisionStringToString(revisionString),revision= revisionStringToRevision(revisionString)
)
fun uri()=value
/**
* @return full-string with revision
*/
fun revisionUri()="$value${revision.orEmpty()}"
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ ext {
// supportLibraryVersion = '1.1.0-alpha05'
constrainLayoutVersion = '1.1.3'
// requeryVersion = '1.5.1'
requeryVersion = '1.6.1'
rxBindingVersion = '3.0.0'
conductorVersion = '3.0.0-rc1'
materialVersion = '1.1.0-alpha10'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment