Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

feat: add ent plugin #52

Closed
wants to merge 1 commit into from
Closed

feat: add ent plugin #52

wants to merge 1 commit into from

Conversation

elza2
Copy link
Contributor

@elza2 elza2 commented Sep 24, 2022

feat: add ent plugin, https://github.com/ent/ent

@wu-sheng wu-sheng added this to the 1.6.0 milestone Sep 24, 2022
@wu-sheng wu-sheng added the enhancement New feature or request label Sep 24, 2022
@wu-sheng
Copy link
Member

Thanks, the tests are passed now. Let's wait for @arugal review.

Comment on lines +85 to +89
EntClient := entschema.NewClient(
entschema.Driver(
NewDriver(drv, apmDB),
),
)
Copy link
Member

Choose a reason for hiding this comment

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

@xiaohuo473225193 The gen/entschema seems to be generated based on schema, this plugin does not apply to other schema, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. The plugin is used for all schema definitions.

Copy link
Member

@arugal arugal Sep 25, 2022

Choose a reason for hiding this comment

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

But, the NewClient that you have here can only be used for the user schema that you define.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ent can only operate based on the code it generates. NewClient it's the only way in method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

NewClient has nothing to do with the schema definition.

Copy link
Member

Choose a reason for hiding this comment

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

Can you demonstrate how to reference ent plugin in the new repository?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is actually an example, not a specific plugin. This is just one way to access the trace method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is just a reference method provided by Ent access trace. I use this approach in my project.

Copy link

@hoslo hoslo Oct 17, 2022

Choose a reason for hiding this comment

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

why Merging is blocked?

Copy link
Member

Choose a reason for hiding this comment

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

Because we are not sure whether this is suitable for our project.

We are hosting a plugin if it is out-of-box, rather than an example. Basically, we are confused.

@elza2 elza2 closed this by deleting the head repository Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
4 participants