1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.ddl;
19
20 import lombok.Getter;
21 import lombok.RequiredArgsConstructor;
22 import lombok.Setter;
23 import org.apache.shardingsphere.sql.parser.sql.common.segment.ddl.table.CreateTableOptionSegment;
24 import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
25 import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateTableStatement;
26 import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.MySQLStatement;
27
28 import java.util.Optional;
29
30
31
32
33 @RequiredArgsConstructor
34 @Getter
35 @Setter
36 public final class MySQLCreateTableStatement extends CreateTableStatement implements MySQLStatement {
37
38 private final boolean ifNotExists;
39
40 private SimpleTableSegment likeTable;
41
42 private CreateTableOptionSegment createTableOptionSegment;
43
44
45
46
47
48
49 public Optional<SimpleTableSegment> getLikeTable() {
50 return Optional.ofNullable(likeTable);
51 }
52
53
54
55
56
57
58 public Optional<CreateTableOptionSegment> getCreateTableOptionSegment() {
59 return Optional.ofNullable(createTableOptionSegment);
60 }
61 }