Skip to content

Commit

Permalink
feat: create builder to create table
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <[email protected]>
  • Loading branch information
otaviojava committed Nov 28, 2023
1 parent d03e10b commit 1e1d200
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion core/src/main/java/expert/os/harperdb/CreateTableBuilder.java
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;
}
}

}

0 comments on commit 1e1d200

Please sign in to comment.