Skip to content

Commit 73209d6

Browse files
committed
PT-896 Add support for json data type in sql
1 parent 73154fd commit 73209d6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/PHPSQLParser/processors/ColumnDefinitionProcessor.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ public function process($tokens) {
128128
$currCategory = 'SINGLE_PARAM_PARENTHESIS';
129129
continue 2;
130130

131+
case 'JSON':
132+
$expr[] = array('expr_type' => ExpressionType::DATA_TYPE, 'base_expr' => $trim);
133+
$prevCategory = 'TEXT';
134+
$currCategory = 'SINGLE_PARAM_PARENTHESIS';
135+
continue 2;
136+
131137
case 'VARBINARY':
132138
$expr[] = array('expr_type' => ExpressionType::DATA_TYPE, 'base_expr' => $trim, 'length' => false);
133139
$prevCategory = $upper;

0 commit comments

Comments
 (0)