Skip to content

Commit

Permalink
Merge pull request #12 from grongierisc/main
Browse files Browse the repository at this point in the history
Fix visit_VARCHAR method in IRISTypeCompiler to handle default length…
  • Loading branch information
daimor authored Apr 17, 2024
2 parents a1f1328 + 735a354 commit f9c79a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sqlalchemy_iris/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,12 @@ def visit_BOOLEAN(self, type_, **kw):
def visit_BIT(self, type_, **kw):
return "BIT"

def visit_VARCHAR(self, type_, **kw):
# If length is not specified, use 50 as default in IRIS
if type_.length is None:
type_ = VARCHAR(50)
return "VARCHAR(%d)" % type_.length

def visit_TEXT(self, type_, **kw):
return "VARCHAR(65535)"

Expand Down

0 comments on commit f9c79a0

Please sign in to comment.