mirror of
https://github.com/CarmJos/EasySQL.git
synced 2026-06-04 15:28:20 +08:00
添加部分 Objects.requireNonNull()
This commit is contained in:
@@ -29,7 +29,7 @@ public interface SQLUpdateAction extends SQLAction<Integer> {
|
||||
|
||||
/**
|
||||
* 设定该操作是否返回自增键序列。
|
||||
*
|
||||
|
||||
* @param returnGeneratedKey 是否返回自增键序列
|
||||
* @return {@link SQLUpdateAction}
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,8 @@ import cc.carm.lib.easysql.api.enums.NumberType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import static cc.carm.lib.easysql.api.SQLBuilder.withBackQuote;
|
||||
import static cc.carm.lib.easysql.api.SQLBuilder.withQuote;
|
||||
|
||||
@@ -67,6 +69,7 @@ public interface TableCreateBuilder extends SQLBuilder {
|
||||
* @return {@link TableCreateBuilder}
|
||||
*/
|
||||
default TableCreateBuilder addColumn(@NotNull String columnName, @NotNull String settings) {
|
||||
Objects.requireNonNull(columnName, "columnName could not be null");
|
||||
return addColumn(withBackQuote(columnName) + " " + settings);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user