Skip to content

Commit 5f2531a

Browse files
committed
MergeTree::getEngine method
1 parent 4f76104 commit 5f2531a

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/Tables/MergeTree.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ public function engine(Engine|string $engine, ...$params): static
115115
return $this;
116116
}
117117

118+
public function getEngine(): Engine
119+
{
120+
return $this->engine;
121+
}
122+
118123
public function orderBy(...$orderBy): static
119124
{
120125
$this->orderBy = $orderBy;

tests/MainTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testColumns()
3030
->columns(fn(MergeTree $t) => [
3131
$t->string('col_one')->default('5')->comment('some comment'),
3232
$t->string('col_two')->default(new Expression('col_one')),
33-
$t->integer('col_int1'),
33+
$t->integer('col_int1')->default(0),
3434
$t->integer('col_int2', 128),
3535
$t->integer('col_int3', 256, false),
3636
$t->uInt8('col_int4'),

tests/compilations/table_with_columns.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CREATE TABLE some_table (
22
col_one String DEFAULT '5' COMMENT 'some comment',
33
col_two String DEFAULT col_one,
4-
col_int1 Int32,
4+
col_int1 Int32 DEFAULT 0,
55
col_int2 Int128,
66
col_int3 UInt256,
77
col_int4 UInt8,

0 commit comments

Comments
 (0)