Giter Site home page Giter Site logo

Comments (5)

denisdubovitskiy avatar denisdubovitskiy commented on May 22, 2024 1

@nhumrich yeah, I've taken a closer look to the code of connection.py and decided to create my first GitHub PR ;-) #94
Please take a look at that

This PR is related to the following issue #59

from asyncpgsa.

nhumrich avatar nhumrich commented on May 22, 2024 1

This has been merged and is in version 0.25.0

from asyncpgsa.

nhumrich avatar nhumrich commented on May 22, 2024

I dont run migrations in asyncio. So this has never been supported. This repo doesn't currently support everything sqlalchemy supports, only a subset. It looks like DropTable isnt "compiled", but rather an orm feature.
I would accept a PR to support this, but since its a feature I dont use, I dont have the time to work on this myself.

from asyncpgsa.

denisdubovitskiy avatar denisdubovitskiy commented on May 22, 2024

So, any ideas about how to create and drop tables between test cases? Is it really possible or we need to apply migrations to the database first?

The only solution I know is to manually iterate over the list of tables and create/drop them compiling the statements:

DropTable(table).compile(dialect=postgresql.dialect())

from asyncpgsa.

nhumrich avatar nhumrich commented on May 22, 2024

So, looking at this error a second time, it looks like the issue might be that droptable compiled doesn't have any params. compiled.params == None. So, maybe this is a fixable bug. Might be worth adding a none check to connection.py line 60. Would you have time to take a look at this, and maybe add a test case for it?

from asyncpgsa.

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.