Last active
December 27, 2017 08:31
-
-
Save ryansgot/e3f60cfa93c9690a14fd254fd59ac1e3 to your computer and use it in GitHub Desktop.
Basic Forsuredb Upsert 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 = ForSure.myTable() | |
.find() // <-- start narrowing the number of records and columns to update | |
.byIntColumnBetween(3).andInclusive(10) // <-- set bounds (3, 10] | |
.and().byNotDeleted() // <-- add additional condition that the record must not be "soft deleted" | |
.then() // <-- end narrowing number of records and columns to return | |
.set() // <-- start setting column values to update | |
.stringColumn("Your int_column value is greater than three and less than or equal to 10") | |
.save(); | |
System.out.println("Number of records updated: " + result.rowsAffected()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment