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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] List all Indexes from table inside typedef template #390

Open
fcjack opened this issue Mar 3, 2023 · 1 comment
Open

[Question] List all Indexes from table inside typedef template #390

fcjack opened this issue Mar 3, 2023 · 1 comment

Comments

@fcjack
Copy link

fcjack commented Mar 3, 2023

Hey 馃憢馃徑 ,

I am using the XO in our project and we are trying to include a Go interface in the datasource with all methods generated.
The typedef definition works fine and I have the main methods already on interface, but I would like to include the methods generated by Indexes too.

Is there any way to list all Indexes inside typedef template to include this on my interface?
Or is there any way that someone already knows how to include the interface with all methods genterated?

thanks for help!

@fcjack
Copy link
Author

fcjack commented Mar 3, 2023

To give an example I have this on my template:

type I{{ $t.GoName }}Store interface {
    Query(ctx context.Context, orgID string, query Query, cursor Cursor) ([]{{ $t.GoName }}, Cursor, error)
    FetchAll(ctx context.Context, orgID string, query Query) ([]InstalledIntegration, error)
    Insert(ctx context.Context, orgID string, {{ short $t }} {{ $t.GoName }}) error
    Update(ctx context.Context, orgID string, {{ short $t }} {{ $t.GoName }}) error
    Delete(ctx context.Context, orgID string, {{ short $t }} {{ $t.GoName }}) error
}

But I need to include the methods generated by indexes too.

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

No branches or pull requests

1 participant