MySQL Shell API 8.0.38
Unified development interface for MySQL Products
|
Handler for Insert operations on Tables. More...
Methods | |
TableInsert | insert () |
Initializes the insertion operation. More... | |
TableInsert | insert (List columns) |
Initializes the insertion operation. More... | |
TableInsert | insert (String column[, String column,...]) |
Initializes the insertion operation. More... | |
TableInsert | insert (JSON columns) |
Initializes the insertion operation. More... | |
TableInsert | values (Value value[, Value value,...]) |
Adds a new row to the insert operation with the given values. More... | |
Result | execute () |
Executes the insert operation. More... | |
Handler for Insert operations on Tables.
TableInsert insert | ( | ) |
Initializes the insertion operation.
Initializes the insertion operation, the arguments provided for the values(Value value[, Value value, ...]) method must match the database columns in number and data types.
After this function invocation, the following function can be invoked:
TableInsert insert | ( | List | columns | ) |
Initializes the insertion operation.
Initializes the insertion operation, the arguments provided for the values(Value value[, Value value, ...]) method must match the specified column names in order and data type.
After this function invocation, the following function can be invoked:
TableInsert insert | ( | String | column[, String column,...] | ) |
Initializes the insertion operation.
Initializes the insertion operation, the arguments provided for the values(Value value[, Value value, ...]) method must match the specified column names in order and data type.
After this function invocation, the following function can be invoked:
TableInsert insert | ( | JSON | columns | ) |
Initializes the insertion operation.
Initializes the insertion operation, it is ready to be completed and it will insert the associated values into the corresponding columns.
After this function invocation, the following function can be invoked:
TableInsert values | ( | Value | value[, Value value,...] | ) |
Adds a new row to the insert operation with the given values.
Each parameter represents the value for a column in the target table.
If the columns were defined on the insert() function, the number of values on this function must match the number of defined columns.
If no column was defined, the number of parameters must match the number of columns on the target Table.
This function is not available when the insert() is called passing a JSON object with columns and values.
Using Expressions As Values
If a mysqlx.expr(...) object is defined as a value, it will be evaluated in the server, the resulting value will be inserted into the record.
This function can be invoked multiple times after:
Result execute | ( | ) |
Executes the insert operation.
This function can be invoked after: