lib/dataset/actions.js
function () {
            var args = argsToArray(arguments);
            var cb = isFunction(args[args.length - 1]) ? args.pop() : null;
            return this.executeInsert(this.insertSql.apply(this, args)).classic(cb);
        }
function () {
            var args = argsToArray(arguments);
            var cb = isFunction(args[args.length - 1]) ? args.pop() : null;
            return this.executeInsert(this.insertSql.apply(this, args)).classic(cb);
        }
function ( ) { var args = argsToArray ( arguments ) ; var cb = isFunction ( args [ args . length - 1 ] ) ? args . pop ( ) : null ; return this . executeInsert ( this . insertSql . apply ( this , args ) ) . classic ( cb ) ; }
Inserts values into the associated table. The returned value is generally
the value of the primary key for the inserted row, but that is adapter dependent.

@example

// INSERT INTO items DEFAULT VALUES
DB.from("items").insert()

// INSERT INTO items DEFAULT VALUES
DB.from("items").insert({});

// INSERT INTO items VALUES (1, 2, 3)
DB.from("items").insert([1,2,3]);

// INSERT INTO items (a, b) VALUES (1, 2)
DB.from("items").insert(["a", "b"], [1,2]);

// INSERT INTO items (a, b) VALUES (1, 2)
DB.from("items").insert({a : 1, b : 2});

// INSERT INTO items SELECT * FROM old_items
DB.from("items").insert(DB.from("old_items"));

// INSERT INTO items (a, b) SELECT * FROM old_items
DB.from("items").insert(["a", "b"], DB.from("old_items"));



@param {patio.Dataset|patio.sql.LiteralString|Array|Object|patio.sql.BooleanExpression|...} values  values to
insert into the database. The INSERT statement generated depends on the type.
<ul>
<li>Empty object| Or no arugments: then DEFAULT VALUES is used.</li>
<li>Object: the keys will be used as the columns, and values will be the values inserted.</li>
<li>Single {@link patio.Dataset} : an insert with subselect will be performed.</li>
<li>Array with {@link patio.Dataset} : The array will be used for columns and a subselect will performed with the dataset for the values.</li>
<li>{@link patio.sql.LiteralString} : the literal value will be used.</li>
<li>Single Array : the values in the array will be used as the VALUES clause.</li>
<li>Two Arrays: the first array is the columns the second array is the values.</li>
<li>{@link patio.sql.BooleanExpression} : the expression will be used as the values.
<li>An arbitrary number of arguments : the {@link patio.Dataset#literal} version of the values will be used</li>
</ul>
@param {Function} [cb] the callback to invoke when the action is done.

@return {comb.Promise} a promise that is typically resolved with the ID of the inserted row.
Inserts values into the associated table . The returned value is generally the value of the primary key for the inserted row but that is adapter dependent .