xo
xo copied to clipboard
[Question] List all Indexes from table inside typedef template
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!
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.