Last active
December 27, 2017 08:21
-
-
Save ryansgot/71734f06c59358f1a099cbbb5080d26a to your computer and use it in GitHub Desktop.
Basic Forsuredb Create (insert) query android
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
SaveResult<Uri> result = Forsuredb.myTable() // <-- the generated ForSure class serves as your entrypoint | |
.set() // <-- enter insert/update/delete portion of query | |
.stringColumn("My String") // <-- set the value of the column | |
.intColumn(42) // <-- column value setters are typesafe | |
.save(); // <-- performs the insertion and sends back a SaveResult | |
Uri inserted = result.inserted(); // <-- SaveResult contains a locator for the inserted record |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment