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

fix issue #1437 #1440

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pgrx-sql-entity-graph/src/postgres_enum/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl ToEntityGraphTokens for PostgresEnum {
let (_static_impl_generics, static_ty_generics, static_where_clauses) =
static_generics.split_for_impl();

let variants = self.variants.iter();
let variants = self.variants.iter().map(|variant| variant.ident.clone());
let sql_graph_entity_fn_name =
syn::Ident::new(&format!("__pgrx_internals_enum_{}", name), Span::call_site());

Expand Down
3 changes: 2 additions & 1 deletion pgrx-tests/src/tests/enum_type_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
//LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.
use pgrx::prelude::*;

#[derive(PostgresEnum, PartialEq, Debug)]
#[derive(PostgresEnum, PartialEq, Debug, Default)]
pub enum Foo {
#[default]
One,
Two,
Three,
Expand Down