Package cc.carm.lib.easysql.api
Class SQLTable
- java.lang.Object
-
- cc.carm.lib.easysql.api.SQLTable
-
public abstract class SQLTable extends java.lang.ObjectSQLTable 基于TableCreateBuilder构建表,用于快速创建与该表相关的操作。- 1. 调用
of(String, String[])方法创建一个 SQLTable 对象; - 2. 在应用初始化阶段调用
create(SQLManager)方法初始化 SQLTable 对象; - 3. 获取已创建的
SQLTable实例,直接调用对应方法进行关于表的相关操作。
- Since:
- 0.3.10
- Author:
- CarmJos
- 1. 调用
-
-
Field Summary
Fields Modifier and Type Field Description protected SQLManagermanager
-
Method Summary
-
-
-
Field Detail
-
manager
protected SQLManager manager
-
-
Method Detail
-
of
@NotNull public static @NotNull SQLTable of(@NotNull @NotNull java.lang.String tableName, @Nullable @Nullable SQLHandler<TableCreateBuilder> table)
-
of
@NotNull public static @NotNull SQLTable of(@NotNull @NotNull java.lang.String tableName, @NotNull @NotNull java.lang.String[] columns)
-
of
@NotNull public static @NotNull SQLTable of(@NotNull @NotNull java.lang.String tableName, @NotNull @NotNull java.lang.String[] columns, @Nullable @Nullable java.lang.String tableSettings)
-
getTableName
@NotNull public @NotNull java.lang.String getTableName()
-
create
public abstract boolean create(SQLManager sqlManager) throws java.sql.SQLException
使用指定 SQLManager 进行本示例的初始化。- Parameters:
sqlManager-SQLManager- Returns:
- 本表是否为首次创建
- Throws:
java.sql.SQLException- 出现任何错误时抛出
-
createQuery
@NotNull public @NotNull TableQueryBuilder createQuery(@NotNull @NotNull SQLManager sqlManager)
-
createQuery
@NotNull public @NotNull TableQueryBuilder createQuery()
-
createDelete
@NotNull public @NotNull DeleteBuilder createDelete()
-
createDelete
@NotNull public @NotNull DeleteBuilder createDelete(@NotNull @NotNull SQLManager sqlManager)
-
createUpdate
@NotNull public @NotNull UpdateBuilder createUpdate()
-
createUpdate
@NotNull public @NotNull UpdateBuilder createUpdate(@NotNull @NotNull SQLManager sqlManager)
-
createInsert
@NotNull public @NotNull InsertBuilder<PreparedSQLUpdateAction> createInsert()
-
createInsert
@NotNull public @NotNull InsertBuilder<PreparedSQLUpdateAction> createInsert(@NotNull @NotNull SQLManager sqlManager)
-
createInsertBatch
@NotNull public @NotNull InsertBuilder<PreparedSQLUpdateBatchAction> createInsertBatch()
-
createInsertBatch
@NotNull public @NotNull InsertBuilder<PreparedSQLUpdateBatchAction> createInsertBatch(@NotNull @NotNull SQLManager sqlManager)
-
createReplace
@NotNull public @NotNull ReplaceBuilder<PreparedSQLUpdateAction> createReplace()
-
createReplace
@NotNull public @NotNull ReplaceBuilder<PreparedSQLUpdateAction> createReplace(@NotNull @NotNull SQLManager sqlManager)
-
createReplaceBatch
@NotNull public @NotNull ReplaceBuilder<PreparedSQLUpdateBatchAction> createReplaceBatch()
-
createReplaceBatch
@NotNull public @NotNull ReplaceBuilder<PreparedSQLUpdateBatchAction> createReplaceBatch(@NotNull @NotNull SQLManager sqlManager)
-
-