Comments (11)
Original comment by Alex Grönholm (Bitbucket: agronholm, GitHub: agronholm):
You could just wrap the column list in *[...].
from sqlacodegen.
Original comment by tomanizer (Bitbucket: tomanizer, GitHub: tomanizer):
+1 for wrapping more than 255 columns in *[...]
from sqlacodegen.
Original comment by Tom D (Bitbucket: tom-d, GitHub: tom-d):
Thank you for the heads up. It's not ideal, but very useful. In the meantime I'll fork/tag a release for myself.
from sqlacodegen.
Original comment by Alex Grönholm (Bitbucket: agronholm, GitHub: agronholm):
I have uncommitted changes that change the code layout radically. So prepare for breakage when 2.0 final is released.
from sqlacodegen.
Original comment by Tom D (Bitbucket: tom-d, GitHub: tom-d):
+1
I get this too.
In my use case I run CodeGenerator directory so I could subclass to patch the rendering but had to pip install directly from master, all of which is very brittle.
from sqlacodegen.
Original comment by Alex Grönholm (Bitbucket: agronholm, GitHub: agronholm):
I will keep this issue open to remind me to do that automatically for tables with 256 or more arguments.
from sqlacodegen.
Original comment by Cristian Mitroi (Bitbucket: cristianxyz, GitHub: Unknown):
I guess I could, but it turns out there are multiple such tables. Wouldn't just changing the code to do so from the get-go be better for future cases?
from sqlacodegen.
Original comment by Cristian Mitroi (Bitbucket: cristianxyz, GitHub: Unknown):
From sqla docs, I could tell that you could iterate through the list of columns, and add them one at a time. Would this work? http://docs.sqlalchemy.org/en/rel_1_0/core/metadata.html#sqlalchemy.schema.Table.append_column
Would this be the line where the change could be made? https://bitbucket.org/agronholm/sqlacodegen/src/8be7df77c4f70036e85c6c02618b6538d4431fbc/sqlacodegen/codegen.py?at=master&fileviewer=file-view-default#codegen.py-515
from sqlacodegen.
Original comment by Cristian Mitroi (Bitbucket: cristianxyz, GitHub: Unknown):
#!
File "new.py", line 7
t_ACINVOICE = Table('ACINVOICE', metadata,
SyntaxError: more than 255 arguments
gist: https://gist.github.com/cristianmtr/96c9a851bee141855da1
from sqlacodegen.
Original comment by Alex Grönholm (Bitbucket: agronholm, GitHub: agronholm):
Syntax error? I just tried passing 300 arguments to a function and it worked fine.
from sqlacodegen.
Since this restriction has been lifted in Python 3.7, I'm closing the issue.
from sqlacodegen.
Related Issues (20)
- Stop double pluralization of names
- In the automatically generated model file, the self-incrementing id field does not have the `autoincrement=true` attribute HOT 5
- codegen.py:390: SAWarning: Cannot correctly sort tables HOT 4
- Code generation for PostgreSQL composite types
- Option --generator only works in pre-release package HOT 3
- fix function name in codegen.py for python v3.11 HOT 1
- Nullable relationships require `Optional`
- Error in Generated SQLAlchemy Model for CHAR Column HOT 2
- Constraints Issues with Oracle HOT 1
- Unable to install `sqlacodegen` due to ioutdated PyPI release HOT 2
- Add support for multiple databases binding
- Entry point documentation
- Enhancement: Add Support for pgvector extension HOT 2
- SQLModel codegen produces syntax errors HOT 4
- Syntax Error in 3.0.0rc3 HOT 5
- No poetry package which supports SQLAlchemy 2.0 HOT 5
- AssertionError: TypeDecorator implementations require a class-level variable 'impl' HOT 14
- sqlalchemy.exc.OperationalError HOT 5
- Database URL is split on & HOT 1
- No module named 'pkg_resources' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlacodegen.