public class InsertSqlImpl extends SqlLogImpl implements InsertSql, UseAliasSupport, PrepareStatementBuildSupport
| Constructor and Description |
|---|
InsertSqlImpl(Mapper<?> mapper) |
| Modifier and Type | Method and Description |
|---|---|
int |
executeInsert()
插入
|
int |
executeInsertWithGenerateKeys(KeyValuePair key)
插入
|
PrepareStatement |
getPrepareStatement()
获取预查询SQL
|
InsertSql |
insert(List<Table> tables)
`INSERT INTO table1 t1, table2 t2...` 语句, t1, t2表示"表别名"
|
InsertSql |
insert(Table table)
`INSERT INTO table1 t1` 语句, t1表示"表别名"
|
InsertSql |
insertDefault()
插入表,从mapper获取
|
boolean |
isUseAlias()
是否使用别名
|
InsertSql |
onDuplicateKeyUpdate(List<SetItem> items)
批量增加设置内容
|
InsertSql |
onDuplicateKeyUpdate(SetItem item)
增加设置内容
|
InsertSql |
values(Column column,
Object value)
`(column1) VALUES(?)`语句
|
InsertSql |
values(ColumnValue columnValue)
`(column1) VALUES(?)`语句
|
InsertSql |
values(List<? extends ColumnValue> columnValues)
`(column1, column2, ...) VALUES(?, ?, ...)`语句
|
InsertSql |
values(List<Column> columns,
List<Object> values)
`(column1, column2, ...) VALUES(?, ?, ...)`语句
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappend, append, getPrepareStatement, getPrepareStatement, getPrepareStatement, getPrepareStatementpublic InsertSqlImpl(Mapper<?> mapper)
public InsertSql insert(Table table)
InsertTableSupportinsert in interface InsertTableSupport<InsertSql>table - 表对象Tablepublic InsertSql insert(List<Table> tables)
InsertTableSupportinsert in interface InsertTableSupport<InsertSql>tables - 表对象列表Tablepublic InsertSql values(List<? extends ColumnValue> columnValues)
ValuesSupportvalues in interface ValuesSupport<InsertSql>columnValues - 列和值列表ColumnValuepublic InsertSql values(ColumnValue columnValue)
ValuesSupportvalues in interface ValuesSupport<InsertSql>columnValue - 列和值ColumnValuepublic InsertSql values(Column column, Object value)
ValuesSupportvalues in interface ValuesSupport<InsertSql>column - 列value - 值public InsertSql values(List<Column> columns, List<Object> values)
ValuesSupportvalues in interface ValuesSupport<InsertSql>columns - 列列表values - 值列表ColumnValuepublic InsertSql onDuplicateKeyUpdate(SetItem item)
OnDuplicateKeyUpdateSupportonDuplicateKeyUpdate in interface OnDuplicateKeyUpdateSupport<InsertSql>item - 设置项public InsertSql onDuplicateKeyUpdate(List<SetItem> items)
OnDuplicateKeyUpdateSupportonDuplicateKeyUpdate in interface OnDuplicateKeyUpdateSupport<InsertSql>items - 设置项public boolean isUseAlias()
UseAliasSupportisUseAlias in interface UseAliasSupportpublic InsertSql insertDefault()
InsertSqlinsertDefault in interface InsertSqlpublic PrepareStatement getPrepareStatement()
PrepareStatementSupportgetPrepareStatement in interface PrepareStatementSupportpublic int executeInsert()
InsertSqlexecuteInsert in interface InsertSqlpublic int executeInsertWithGenerateKeys(KeyValuePair key)
InsertSqlexecuteInsertWithGenerateKeys in interface InsertSqlkey - 生成主键接收对象Copyright © 2020 IBIT程序猿. All rights reserved.