1 | <?php |
||
2 | /** |
||
3 | * Interface CreateTable |
||
4 | * |
||
5 | * @filesource CreateTable.php |
||
6 | * @created 28.06.2017 |
||
7 | * @package chillerlan\Database\Query |
||
8 | * @author Smiley <[email protected]> |
||
9 | * @copyright 2017 Smiley |
||
10 | * @license MIT |
||
11 | */ |
||
12 | |||
13 | namespace chillerlan\Database\Query; |
||
14 | |||
15 | /** |
||
16 | * @method string sql(bool $multi = null) |
||
17 | * @method array getBindValues() |
||
18 | * @method mixed query(string $index = null) |
||
19 | */ |
||
20 | interface CreateTable extends Statement{ |
||
21 | |||
22 | /** |
||
23 | * @param $name |
||
24 | * |
||
25 | * @return \chillerlan\Database\Query\CreateTable |
||
26 | */ |
||
27 | # public function index($name):CreateTable; |
||
28 | |||
29 | # public function timestamp():CreateTable{} |
||
30 | |||
31 | /** |
||
32 | * @return \chillerlan\Database\Query\CreateTable |
||
33 | */ |
||
34 | public function temp():CreateTable; |
||
35 | |||
36 | /** |
||
37 | * @return \chillerlan\Database\Query\CreateTable |
||
38 | */ |
||
39 | public function ifNotExists(); |
||
40 | |||
41 | /** |
||
42 | * @param string $tablename |
||
43 | * |
||
44 | * @return \chillerlan\Database\Query\CreateTable |
||
45 | */ |
||
46 | public function name(string $tablename); |
||
47 | |||
48 | /** |
||
49 | * @param string $field |
||
50 | * @param string|null $dir |
||
51 | * |
||
52 | * @return \chillerlan\Database\Query\CreateTable |
||
53 | */ |
||
54 | public function primaryKey(string $field, string $dir = null):CreateTable; |
||
55 | |||
56 | /** |
||
57 | * @param string $collation |
||
58 | * |
||
59 | * @return \chillerlan\Database\Query\CreateTable |
||
60 | */ |
||
61 | public function charset(string $collation); |
||
62 | |||
63 | /** |
||
64 | * @param string $name |
||
65 | * @param string $type |
||
66 | * @param null $length |
||
0 ignored issues
–
show
Documentation
Bug
introduced
by
![]() |
|||
67 | * @param string|null $attribute |
||
68 | * @param string|null $collation |
||
69 | * @param bool|null $isNull |
||
70 | * @param string|null $defaultType |
||
71 | * @param mixed|null $defaultValue |
||
72 | * @param string|null $extra |
||
73 | * |
||
74 | * @return \chillerlan\Database\Query\CreateTable |
||
75 | */ |
||
76 | public function field(string $name, string $type, $length = null, string $attribute = null, string $collation = null, bool $isNull = null, string $defaultType = null, $defaultValue = null, string $extra = null):CreateTable; |
||
77 | |||
78 | /** |
||
79 | * @param string $name |
||
80 | * @param int|null $length |
||
81 | * @param null $defaultValue |
||
0 ignored issues
–
show
|
|||
82 | * @param bool|null $isNull |
||
83 | * @param string|null $attribute |
||
84 | * |
||
85 | * @return \chillerlan\Database\Query\CreateTable |
||
86 | */ |
||
87 | public function tinyint(string $name, int $length = null, $defaultValue = null, bool $isNull = null, string $attribute = null):CreateTable; |
||
88 | |||
89 | /** |
||
90 | * @param string $name |
||
91 | * @param int|null $length |
||
92 | * @param null $defaultValue |
||
0 ignored issues
–
show
|
|||
93 | * @param bool|null $isNull |
||
94 | * @param string|null $attribute |
||
95 | * |
||
96 | * @return \chillerlan\Database\Query\CreateTable |
||
97 | */ |
||
98 | public function int(string $name, int $length = null, $defaultValue = null, bool $isNull = null, string $attribute = null):CreateTable; |
||
99 | |||
100 | /** |
||
101 | * @param string $name |
||
102 | * @param null $defaultValue |
||
0 ignored issues
–
show
|
|||
103 | * @param bool|null $isNull |
||
104 | * |
||
105 | * @return \chillerlan\Database\Query\CreateTable |
||
106 | */ |
||
107 | public function tinytext(string $name, $defaultValue = null, bool $isNull = null):CreateTable; |
||
108 | |||
109 | /** |
||
110 | * @param string $name |
||
111 | * @param null $defaultValue |
||
0 ignored issues
–
show
|
|||
112 | * @param bool|null $isNull |
||
113 | * |
||
114 | * @return \chillerlan\Database\Query\CreateTable |
||
115 | */ |
||
116 | public function text(string $name, $defaultValue = null, bool $isNull = null):CreateTable; |
||
117 | |||
118 | /** |
||
119 | * @param string $name |
||
120 | * @param int $length |
||
121 | * @param null $defaultValue |
||
0 ignored issues
–
show
|
|||
122 | * @param bool|null $isNull |
||
123 | * |
||
124 | * @return \chillerlan\Database\Query\CreateTable |
||
125 | */ |
||
126 | public function varchar(string $name, int $length, $defaultValue = null, bool $isNull = null):CreateTable; |
||
127 | |||
128 | /** |
||
129 | * @param string $name |
||
130 | * @param string $length |
||
131 | * @param null $defaultValue |
||
0 ignored issues
–
show
|
|||
132 | * @param bool|null $isNull |
||
133 | * |
||
134 | * @return \chillerlan\Database\Query\CreateTable |
||
135 | */ |
||
136 | public function decimal(string $name, string $length, $defaultValue = null, bool $isNull = null):CreateTable; |
||
137 | |||
138 | /** |
||
139 | * @param string $name |
||
140 | * @param array $values |
||
141 | * @param null $defaultValue |
||
0 ignored issues
–
show
|
|||
142 | * @param bool|null $isNull |
||
143 | * |
||
144 | * @return \chillerlan\Database\Query\CreateTable |
||
145 | */ |
||
146 | public function enum(string $name, array $values, $defaultValue = null, bool $isNull = null):CreateTable; |
||
147 | |||
148 | } |
||
149 |