How to use [data.create]

The reference page of data.create has its arguments, constraints and declaration.

This slot inserts a new row into your database, using the current open connection created by [data.connect]. It generates the SQL for your database type, and takes the same [table] and [values] arguments as [sql.create]. Its value resolves to the ID of the created row if [return-id] is true, which is the default, otherwise to null. It also accepts the following arguments.

  • [table] - Name of the table to insert into. Mandatory, the slot throws if it is missing
  • [values] - Column names and values to insert, as children nodes. Mandatory, the slot throws if it is missing
  • [database-type] - Database adapter to use instead of your default database type
  • [generate] - If true, only generates the SQL and its parameters instead of executing it, default is false
  • [return-id] - Whether or not to return the ID of the created row, default is true