Coder Social home page Coder Social logo

Option to ignore tables about sqlacodegen HOT 9 CLOSED

agronholm avatar agronholm commented on June 12, 2024
Option to ignore tables

from sqlacodegen.

Comments (9)

agronholm avatar agronholm commented on June 12, 2024

Couldn't you just remove the unwanted tables from the output?

from sqlacodegen.

emattiza avatar emattiza commented on June 12, 2024

Agreed!

from sqlacodegen.

gmonkman avatar gmonkman commented on June 12, 2024

Couldn't you just remove the unwanted tables from the output?

Also posted against #39.

Unsupported data types cause sqlacodegen to fail without producing any output. My example is spatial datatypes (geography and geometry) in MSSQL.

I still want to use SQLAlchemy for almost all my CRUD. I can hand roll my own CRUD for tables with spatial data, but it would be nice to be able to dump the model for most of my DB using sqlacodegen.

from sqlacodegen.

agronholm avatar agronholm commented on June 12, 2024

It would seem that the right solution then is for sqlacodegen to automatically skip tables it cannot handle. Agreed?

from sqlacodegen.

agronholm avatar agronholm commented on June 12, 2024

Also, if you can point me to a library which adds those geography/geometry types to MSSQL, I'd be happy to add a conditional import for that.

from sqlacodegen.

gmonkman avatar gmonkman commented on June 12, 2024

It would seem that the right solution then is for sqlacodegen to automatically skip tables it cannot handle. Agreed?

Ta, perfectly great for me. Would need some sort of feedback to user letting them know why the table was skipped.

Also, if you can point me to a library which adds those geography/geometry types to MSSQL, I'd be happy to add a conditional import for that.

The geoalchemy project would appear to add sqlalchemy support for MSSQL spatial datatypes but is not supported for Python >2.6.

The geoalchemy2 project, unfortunately does not support MSSQL, only PostGIS/Postgresql

Not found anyother liibraries to support MSSQL spatial types in SQLAlchemy.

from sqlacodegen.

agronholm avatar agronholm commented on June 12, 2024

Ta, perfectly great for me. Would need some sort of feedback to user letting them know why the table was skipped.

That's what I'll do then, assuming there are no problems with this approach coming from the sqlalchemy reflection process itself (which I do not control).

Not found anyother liibraries to support MSSQL spatial types in SQLAlchemy.

Are those types native to MSSQL? If they are, then it would be best to file a PR against SQLAlchemy itself.

from sqlacodegen.

gmonkman avatar gmonkman commented on June 12, 2024

Are those types native to MSSQL? If they are, then it would be best to file a PR against SQLAlchemy itself.
Yes, native types since sql server 2008. Will do. Thanks.

from sqlacodegen.

gmonkman avatar gmonkman commented on June 12, 2024

So are they native to MSSQL or not?

Yup, since MSSQL 2008.

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.