This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String uuid = UUID.randomUUID().toString(); | |
// create (upsert) | |
ForSure.employeesTable() | |
.set().firstName("Some").lastName("Name").uuid(uuid) | |
.save(); | |
// retrieve | |
EmployeesTable api = ForSure.employeesTable().getApi(); | |
Retriever retriever = ForSure.employeesTable().get(); | |
if (retriever.moveToFirst()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.fsryan.example.forsuredb"> | |
<!-- Must decalre an application class --> | |
<application | |
android:name=".App" | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.fsryan.example.forsuredb"> | |
<!-- Must decalre an application class --> | |
<application | |
android:name=".App" | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Application; | |
import com.fsryan.forsuredb.FSDBHelper; | |
import com.fsryan.forsuredb.ForSureAndroidInfoFactory; | |
import com.fsryan.forsuredb.gsonserialization.FSDbInfoGsonSerializer; | |
import com.fsryan.forsuredb.api.FSTableCreator; | |
public class App extends Application { | |
@Override | |
public void onCreate() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Application | |
import com.fsryan.forsuredb.FSDBHelper | |
import com.fsryan.forsuredb.ForSureAndroidInfoFactory | |
import com.fsryan.forsuredb.gsonserialization.FSDbInfoGsonSerializer | |
import com.fsryan.forsuredb.api.FSTableCreator | |
class App : Application() { | |
override fun onCreate() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Application; | |
import com.fsryan.forsuredb.FSDBHelper; | |
import com.fsryan.forsuredb.ForSureAndroidInfoFactory; | |
import com.fsryan.forsuredb.gsonserialization.FSDbInfoGsonSerializer; | |
import com.fsryan.forsuredb.api.FSTableCreator; | |
public class App extends Application { | |
@Override | |
public void onCreate() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
apply plugin: 'com.fsryan.gradle.forsuredb' | |
apply plugin: 'kotlin-android' // <-- must appear after applying forsuredb | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'kotlin-kapt' | |
dependencies { | |
kapt 'com.fsryan.forsuredb:forsuredbcompiler:0.13.0' | |
implementation 'com.fsryan.forsuredb:forsuredbapi:0.13.0' | |
implementation 'com.fsryan.forsuredb:sqlitelib:0.13.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
apply plugin: 'com.fsryan.gradle.forsuredb' | |
dependencies { | |
annotationProcessor 'com.fsryan.forsuredb:forsuredbcompiler:0.13.0' | |
implementation 'com.fsryan.forsuredb:forsuredbapi:0.13.0' | |
implementation 'com.fsryan.forsuredb:sqlitelib:0.13.0' | |
implementation 'com.fsryan.forsuredb:forsuredbandroid-contentprovider:0.13.0' | |
// forsuredbmodels-jackson and forsuredbmodels-moshi are also options | |
implementation 'com.fsryan.forsuredb:forsuredbmodels-gson:0.13.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
apply plugin: 'com.fsryan.gradle.forsuredb' | |
dependencies { | |
annotationProcessor 'com.fsryan.forsuredb:forsuredbcompiler:0.13.0' | |
implementation 'com.fsryan.forsuredb:forsuredbapi:0.13.0' | |
implementation 'com.fsryan.forsuredb:sqlitelib:0.13.0' | |
implementation 'com.fsryan.forsuredb:forsuredbandroid-directdb:0.13.0' | |
// forsuredbmodels-jackson and forsuredbmodels-moshi are also options | |
implementation 'com.fsryan.forsuredb:forsuredbmodels-gson:0.13.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
apply plugin: 'com.fsryan.gradle.forsuredb' | |
apply plugin: 'kotlin-android' // <-- must appear after applying forsuredb | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'kotlin-kapt' | |
dependencies { | |
kapt 'com.fsryan.forsuredb:forsuredbcompiler:0.13.0' | |
implementation 'com.fsryan.forsuredb:forsuredbapi:0.13.0' | |
implementation 'com.fsryan.forsuredb:sqlitelib:0.13.0' |