-
Notifications
You must be signed in to change notification settings - Fork 662
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
MG-2214 - Add LTREE Path to Groups #2223
base: main
Are you sure you want to change the base?
Conversation
c8c66bc
to
603cf33
Compare
@@ -52,6 +52,7 @@ type MembersPage struct { | |||
// of Groups that belong to the page. | |||
type Page struct { | |||
PageMeta | |||
Type string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
} | ||
return query | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are we returning?
} | ||
if gm.ID == "" { | ||
q = `SELECT DISTINCT g.id, g.domain_id, COALESCE(g.parent_id, '') AS parent_id, g.name, g.description, | ||
g.metadata, g.created_at, g.updated_at, g.updated_by, g.status FROM groups g` | ||
g.metadata, g.created_at, g.updated_at, g.updated_by, g.status, nlevel(path) as level, g.path FROM groups g` | ||
query = buildQuery(gm, "WHERE") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the WHERE
and AND
clauses in buildquery
return query | ||
} | ||
path = parent.Path + "." + g.ID | ||
if len(strings.Split(path, ".")) > 20 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this magic number
Signed-off-by: WashingtonKK <[email protected]> feat(groups): ffetch groups using ltree Signed-off-by: WashingtonKK <[email protected]> fix(groups): remove lquery Signed-off-by: WashingtonKK <[email protected]> feat(groups): add index Signed-off-by: WashingtonKK <[email protected]> fix(groups): handle empty response body Signed-off-by: WashingtonKK <[email protected]> refactor groups for test Signed-off-by: WashingtonKK <[email protected]>
Signed-off-by: WashingtonKK <[email protected]>
Signed-off-by: WashingtonKK <[email protected]> refactor: ltree in groups Signed-off-by: WashingtonKK <[email protected]>
Signed-off-by: WashingtonKK <[email protected]> fix: tests Signed-off-by: WashingtonKK <[email protected]> fix: tests Signed-off-by: WashingtonKK <[email protected]>
Signed-off-by: WashingtonKK <[email protected]> fix ci Signed-off-by: WashingtonKK <[email protected]>
Signed-off-by: WashingtonKK <[email protected]>
What type of PR is this?
This is a feature because it adds LTREE to groups.
What does this do?
This adds ltree to groups
Which issue(s) does this PR fix/relate to?
Have you included tests for your changes?
Yes, I have included tests for my changes.
Did you document any new/modified feature?
Yes, I have updated the documentation for the new feature.
Notes
Signed-off-by: WashingtonKK [email protected]