Skip to content

Commit

Permalink
Merge pull request #96 from thealphadollar/support_json_datatype
Browse files Browse the repository at this point in the history
Add: Support For JSON Type
  • Loading branch information
kazegusuri authored Aug 22, 2023
2 parents 9379ddd + 3d7e02e commit cbfa130
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ func newColumn(def *ast.ColumnDef) *Column {
dbdt = DBDTText
case TCArray:
dbdt = DBDTJson
case TCJson:
dbdt = DBDTJson
}

var allowCommitTimestamp bool
Expand Down Expand Up @@ -307,6 +309,8 @@ func astTypeToTypeCode(astTypeName ast.ScalarTypeName) TypeCode {
return TCDate
case ast.TimestampTypeName:
return TCTimestamp
case ast.ScalarTypeName("JSON"):
return TCJson
default:
panic("unknown type")
}
Expand Down
1 change: 1 addition & 0 deletions server/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ const (
TCBytes
TCArray
TCStruct
TCJson
)

type ArrayValue interface {
Expand Down

0 comments on commit cbfa130

Please sign in to comment.