Skip to content

Instantly share code, notes, and snippets.

@jnizet
Created February 11, 2015 13:22
Show Gist options
  • Save jnizet/16b057031b561aefefbb to your computer and use it in GitHub Desktop.
Save jnizet/16b057031b561aefefbb to your computer and use it in GitHub Desktop.
import com.ninja_squad.dbsetup.operation.Operation;
import static com.ninja_squad.dbsetup.Operations.*;
public class Foo {
public static void main(String[] args) {
Operation insertVendorsAndProducts =
sequenceOf(
insertInto("VENDOR")
.columns("ID", "CODE", "NAME")
.values(1L, "AMA", "AMAZON")
.build(),
insertInto("PRODUCT")
.columns("ID", "NAME", "VENDOR_ID")
.values(1L, "Kindle", "1L")
.build(),
sql("update VENDOR set FEATURED_PRODUCT_ID = 1 where ID = 1"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment