Skip to content

Commit f9c79a0

Browse files
authored
Merge pull request #12 from grongierisc/main
Fix visit_VARCHAR method in IRISTypeCompiler to handle default length…
2 parents a1f1328 + 735a354 commit f9c79a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sqlalchemy_iris/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,12 @@ def visit_BOOLEAN(self, type_, **kw):
742742
def visit_BIT(self, type_, **kw):
743743
return "BIT"
744744

745+
def visit_VARCHAR(self, type_, **kw):
746+
# If length is not specified, use 50 as default in IRIS
747+
if type_.length is None:
748+
type_ = VARCHAR(50)
749+
return "VARCHAR(%d)" % type_.length
750+
745751
def visit_TEXT(self, type_, **kw):
746752
return "VARCHAR(65535)"
747753

0 commit comments

Comments
 (0)