Last active
December 27, 2017 08:32
-
-
Save ryansgot/8a38153c4632eb400aeca9fe74c4bca8 to your computer and use it in GitHub Desktop.
Basic Forsuredb Delete Query
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
int rowsAffected = ForSure.myTable() // <-- the generated ForSure class serves as your entrypoint | |
.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() // <-- enter insert/update/delete section | |
.hardDelete(); // <-- perform a hard deletion--actually deleting the record | |
System.out.println("Number of records deleted: " + rowsAffected); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment