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

Support Indexing #1842

Open
debendraoli opened this issue Mar 9, 2021 · 0 comments
Open

Support Indexing #1842

debendraoli opened this issue Mar 9, 2021 · 0 comments

Comments

@debendraoli
Copy link

Issue tracker is used for reporting bugs and discussing new features. Please use
Discord or stackoverflow for supporting
issues.

go-pg does not support indexing currently, we have to create indexing manually.

Expected Behavior

Supporting indexing is nice to have for ORM.

Current Behavior

Index tag is not implemented.

Context (Environment)

Most of the us use embedded structure for some sort of base model, take an example for soft delete feature, if we need to create indexing, we need to create index for each and every table in that case.

Detailed Description

Possible Implementation

type Base struct {
    ID uint
    CreatedAt     time.Time
    DeletedAt     time.Time `gorm:",index"`
}
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