-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create builder to create table
Signed-off-by: Otavio Santana <[email protected]>
- Loading branch information
1 parent
d03e10b
commit 1e1d200
Showing
1 changed file
with
37 additions
and
1 deletion.
There are no files selected for viewing
38 changes: 37 additions & 1 deletion
38
core/src/main/java/expert/os/harperdb/CreateTableBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,38 @@ | ||
package expert.os.harperdb;public class CreateTableBuilder { | ||
package expert.os.harperdb; | ||
|
||
import java.util.Objects; | ||
|
||
public final class CreateTableBuilder { | ||
|
||
private final String schema; | ||
|
||
private final Server server; | ||
|
||
CreateTableBuilder(String schema, Server server) { | ||
this.schema = schema; | ||
this.server = server; | ||
} | ||
|
||
|
||
public TableBuilder table(String table) { | ||
Objects.requireNonNull(table, "table is required"); | ||
return new TableBuilder(schema, table, server); | ||
} | ||
|
||
|
||
public static class TableBuilder { | ||
private final String schema; | ||
private final String table; | ||
private final Server server; | ||
private TableBuilder(String schema, String table, Server server) { | ||
this.schema = schema; | ||
this.table = table; | ||
this.server = server; | ||
} | ||
public boolean id(String id) { | ||
Objects.requireNonNull(id, "id is required"); | ||
return false; | ||
} | ||
} | ||
|
||
} |