Skip to content

Commit

Permalink
add varbinary for mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbovyn committed Dec 19, 2023
1 parent 680eb46 commit 8c30744
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/operation-node/data-type-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export type ColumnDataType =
| `decimal(${number}, ${number})`
| 'numeric'
| `numeric(${number}, ${number})`
| 'varbinary'
| `varbinary(${number})`
| 'binary'
| `binary(${number})`
| 'bytea'
Expand Down
4 changes: 4 additions & 0 deletions test/node/src/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ for (const dialect of DIALECTS) {
.addColumn('t', 'char(4)')
.addColumn('u', 'char')
.addColumn('v', 'binary(16)')
.addColumn('w', 'varbinary(16)')
.addColumn('x', 'varbinary')

testSql(builder, dialect, {
mysql: {
Expand Down Expand Up @@ -254,6 +256,8 @@ for (const dialect of DIALECTS) {
'`t` char(4),',
'`u` char,',
'`v` binary(16))',
'`w` varbinary(16))',
'`x` varbinary)',
],
parameters: [],
},
Expand Down

0 comments on commit 8c30744

Please sign in to comment.