Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] sketch AWS Aurora backend #97

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

vincentsarago
Copy link
Member

This PR should't be merged and the code produced here might be forwarded to documentation.

This is an example on how to create a tipg backend with functions written to a tipg_schema instead of pg_temp.

This code is not tested!

schemas = schemas or ["public"]

query = f"""
SELECT {tipg_schema}.tipg_catalog(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use tipg_catalog from a custom schema.

false
);
"""
)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost like tipg.database.connection_factory but without SQL registering to the pg_temp schema


async with app.state.pool.acquire() as conn:
rows = await conn.fetch_b(query, schema=tipg_schema)
assert rows, f"Couldn't file `tipg_catalog` in {tipg_schema}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ not tested, but the idea is to check that the tipg_catalog function exists in the schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant