Skip to content

added schema field, and search_path lookup, fixes #163#164

Open
yuriy-yarosh wants to merge 2 commits intoSeaQL:masterfrom
yuriy-yarosh:fix/postgresql_search_path
Open

added schema field, and search_path lookup, fixes #163#164
yuriy-yarosh wants to merge 2 commits intoSeaQL:masterfrom
yuriy-yarosh:fix/postgresql_search_path

Conversation

@yuriy-yarosh
Copy link

PR Info

New Features

  • Performs enums lookup using all schemas in search_path pg_settings
  • Returns schema name in enum struct, for further filtering in codegen CLI, so only the current schema enums will be persisted into models

Breaking Changes

  • Added schema field into EnumDef, which is a minor bump

Changes

  • Added discover_search_path discover_search_path_with for the search_path pg_setting.
  • Updated tests/discovery/postgres/schema.rs snapshot a bit, to reflect that we're getting public namespace in the enum. It's old and stale, and should be refactored and replaced with some golden files in goldie or similar.
  • Added sqlx-postgres SqlxRow casts.

@yuriy-yarosh
Copy link
Author

We'll need to adopt this approach later for other types and domains, as well...

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.

Improve postgresql schema discovery by tolerating search_path setting

1 participant