Skip to content

Getting back a prepared query without executing? #262

@SnowySailor

Description

@SnowySailor

Is there currently any support for this? I want to build a large sql file and then have it run all at once instead of running queries live against a database as I'm reading in data because it gives me more control of what's happening and also allows for easier debugging. I see there's a function formatQuery but the documentation specifically says to not use it to prepare queries for execution. So is there any way to submit a query string and some parameters then get back a ByteString with all data in place that I can write to a file? If not, I think it would be a great addition. The Python library psycopg2 has it and it's been pretty good to me (it's called mogrify and it's run exactly like a normal query except it returns your prepared query instead of running it).

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions