Coder Social home page Coder Social logo

Comments (11)

agronholm avatar agronholm commented on June 12, 2024 2

Original comment by Alex Grönholm (Bitbucket: agronholm, GitHub: agronholm):


You could just wrap the column list in *[...].

from sqlacodegen.

agronholm avatar agronholm commented on June 12, 2024

Original comment by tomanizer (Bitbucket: tomanizer, GitHub: tomanizer):


+1 for wrapping more than 255 columns in *[...]

from sqlacodegen.

agronholm avatar agronholm commented on June 12, 2024

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.

agronholm avatar agronholm commented on June 12, 2024

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.

agronholm avatar agronholm commented on June 12, 2024

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.

agronholm avatar agronholm commented on June 12, 2024

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.

agronholm avatar agronholm commented on June 12, 2024

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.

agronholm avatar agronholm commented on June 12, 2024

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.

agronholm avatar agronholm commented on June 12, 2024

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.

agronholm avatar agronholm commented on June 12, 2024

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.

agronholm avatar agronholm commented on June 12, 2024

Since this restriction has been lifted in Python 3.7, I'm closing the issue.

from sqlacodegen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.