absmach / magistrala

Industrial IoT Messaging and Device Management Platform

Home Page:https://www.abstractmachines.fr/magistrala.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Use Postgres LTREE for groups hierarchy

arvindh123 opened this issue · comments

Is your feature request related to a problem? Please describe.

Reference: #1980

Describe the feature you are requesting, as well as the possible use case(s) for it.

Implmentation

  • Create Extension LTREE in postgres
  • Add a column with name path and type as LTREE
  • While inserting new row
    If the inserting new row have no parent . path column should have value of id
    If the inserting new row have parent, Get the path column should have parent path + .+ id
  • Retrieve Ancestors / Parents and Descendants / Children by using the below given in #1980

Indicate the importance of this feature to you.

Should-have

Anything else?

No response