Package com.anylogic.engine.connectivity
- java.lang.Object
- com.anylogic.engine.connectivity.ConnectivityBase
- com.anylogic.engine.connectivity.DatabaseAccessor
- com.anylogic.engine.connectivity.Insert
- All Implemented Interfaces:
Serializable
public abstract class Insert extends DatabaseAccessor
Object performing row insertion to the database table
This object is only available in the AnyLogic Professional
This object is only available in the AnyLogic Professional
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
-
execute()
finish()
Serialized Form
Constructor | Description |
---|---|
Insert |
Creates new
Insert object for table with given name with names of
columns to fill specified |
Insert |
Creates new
Insert object for table with given name with names of
columns to fill specified |
Modifier and Type | Method | Description |
---|---|---|
abstract void | evaluateValues_xjal |
This method should fill
values array |
int | execute() |
Performs insertion of one row with current values (provided with
evaluateValues_xjal(Object[]) method) |
void | finish() | |
String | toString() |
public Insert(String name, Database database, String tableName, String[] columnNames)
Creates new
Insert
object for table with given name with names of
columns to fill specified- Parameters:
name
- object name (decoration purpose)database
- theDatabase
objecttableName
- the name of the table where new rows will be insertedcolumnNames
- the array (ordered) of names of the columns being filled in the new inserted rows
public Insert(String name, Database database, String tableName, String[] columnNames, String[] valueTexts)
Creates new
Insert
object for table with given name with names of
columns to fill specified- Parameters:
name
- object name (decoration purpose)database
- theDatabase
objecttableName
- the name of the table where new rows will be insertedcolumnNames
- the array (ordered) of names of the columns being filled in the new inserted rowsvalueTexts
- texts representing values being inserted
This parameter is optional and is used only in the inspect
@AnyLogicInternalCodegenAPI public abstract void evaluateValues_xjal(Object[] values)
This method should fill
values
array- Parameters:
values
- array of the same length as in column names array passed to the constructor
Given array is initially dirty. Implementation is responsible to fill all its values
public int execute()
Performs insertion of one row with current values (provided with
evaluateValues_xjal(Object[])
method)- Returns:
- number of inserted rows (normally 1 row)
public void finish()
public String toString()
- Overrides:
toString
in classConnectivityBase