Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
addiks committed Jul 25, 2016
1 parent 0d67be0 commit 24a74e6
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Addiks/PHPSQL/SqlParser/CreateSqlParser.php
Original file line number Diff line number Diff line change
@@ -335,8 +335,8 @@ protected function parseCreateTable(SQLTokenIterator $tokens)
case $tokens->seekTokenNum(SqlToken::T_FULLTEXT(), TokenIterator::NEXT, [SqlToken::T_CONSTRAINT(), T_STRING]):
case $tokens->seekTokenNum(SqlToken::T_SPATIAL(), TokenIterator::NEXT, [SqlToken::T_CONSTRAINT(), T_STRING]):

/* @var $indexJob Index */
$indexJob = new Index();
/* @var $indexJob IndexPart */
$indexJob = new IndexPart();

switch($tokens->getCurrentTokenNumber()){
case SqlToken::T_UNIQUE():
@@ -881,6 +881,6 @@ protected function parseCreateIndex(SQLTokenIterator $tokens)

protected function parseCreateView(SQLTokenIterator $tokens)
{

}
}
Original file line number Diff line number Diff line change
@@ -147,6 +147,7 @@ public function executeJob(StatementJob $statement, array $parameters = array())

$columnPage->setExtraFlags($flags);

/* @var $dataType DataType */
$dataType = $column->getDataType();

$columnPage->setLength($dataType->getByteLength());
9 changes: 5 additions & 4 deletions src/Addiks/PHPSQL/Value/Enum/Page/Column/DataType.php
Original file line number Diff line number Diff line change
@@ -15,9 +15,9 @@

class DataType extends Enum
{

### NUMBERS

const BIT = 0x01;
const BOOL = 0x02;
const BOOLEAN = 0x02;
@@ -32,15 +32,15 @@ class DataType extends Enum
const FLOAT = 0x09;
const DOUBLE = 0x0A;
const DOUBLE_PRECISION = 0x0A;

### DATE / TIME

const DATE = 0x0B;
const DATETIME = 0x0C;
const TIMESTAMP = 0x0D;
const TIME = 0x0E;
const YEAR = 0x0F;

### STRING

const CHAR = 0x10;
@@ -118,6 +118,7 @@ public function getByteLength()
self::MEDIUMBLOB => 4294967296,
self::MEDIUMTEXT => 4294967296,
self::LONGBLOB => 4294967296,
self::LONGTEXT => 4294967296,
);

$flag = $this->getValue();

0 comments on commit 24a74e6

Please sign in to comment.