public class Insert extends AbstractFragment implements SqlStatement, InsertFragment
Insert statementroot| Constructor and Description |
|---|
Insert(String tableName)
Create a new instance of an
Insert statement |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(InsertVisitor visitor)
Accept a visitor (e.g.
|
protected void |
createInsertValueInstanceIfItDoesNotExist() |
Insert |
field(String... names)
Define fields into which should be inserted
|
String |
getTableName()
Get the name of the table into which data should be inserted
|
Insert |
valuePlaceholder()
Add an unnamed value placeholder to the value list (this is useful for prepared statements)
|
Insert |
valuePlaceholders(int amount)
Add a given number unnamed value placeholder to the value list (this is useful for prepared statements)
|
Insert |
values(int... values)
Insert a list of integer values
|
Insert |
values(String... values)
Insert a list of string values
|
Insert |
valueTable(ValueTable table)
Insert a value table
|
getRootpublic Insert field(String... names)
names - field namesthis for fluent programmingprotected void createInsertValueInstanceIfItDoesNotExist()
public String getTableName()
public Insert valueTable(ValueTable table)
table - value table to be insertedthis for fluent programmingpublic Insert values(String... values)
values - string values to be insertedthis for fluent programmingpublic Insert values(int... values)
values - integer values to be insertedthis for fluent programmingpublic Insert valuePlaceholder()
this for fluent programmingpublic Insert valuePlaceholders(int amount)
amount - number of placeholders to be addedthis for fluent programmingpublic void accept(InsertVisitor visitor)
InsertFragmentaccept in interface InsertFragmentvisitor - visitor to acceptCopyright © 2018–2019. All rights reserved.