Class: insertTable

Adaptor~insertTable(tableName, columns, options) → {Operation}

new insertTable(tableName, columns, options) → {Operation}

Create a table in database when given an array of columns and a table_name.
Parameters:
Name Type Description
tableName string The name of the table to create
columns array An array of form columns
options object Optional options argument
Source:
Returns:
Type
Operation
Example
insertTable('table_name', state => state.data.map(
  column => ({
    name: column.name,
    type: column.type,
    required: true, // optional
    unique: false, // optional - to be set to true for unique constraint
  })
));