Skip to content
redraiment edited this page Jun 2, 2014 · 1 revision

Table#create(Object... args) can help to create a new record in the table and return the created record immediately.

The method uses order independent named parameters, means the column name can contain an optional colon.

Table Zombie = sqlite3.active("zombies");
Zombie.create("name:", "Ash", "graveyard:", "Glen Haven Memorial Cemetery");
Zombie.create("name", "Bob", "graveyard", "Chapel Hill Cemetery");
Zombie.create("graveyard", "My Fathers Basement", "name", "Jim");

In addition, Table provides create(Record o) to create record from an existing record. It's useful to migrate.

Clone this wiki locally