Questions tagged [tree-structure]

110 questions
0
votes
0 answers

how to convert tree query set into dictionary?

book_category_list=[] for book_category in BookCategory.objects.filter(parent__isnull = True): book_category_list.append(book_category.get_family())** now the book_category_list in tree query set format. I need to list categories in a tree…
Rahman
  • 1
0
votes
2 answers

How to convert flat data structure to tree structure in JavaScript using recursion

I want to create a tree from the data provided using recursion. I am also trying to get the tree to pass an npm test, but when I run the test, it is failing. I am getting a tree, but it looks different than the one it is supposed to look like. Here…
0
votes
1 answer

how to save tree structure data in prisma

i try to build app with nestjs with prisma, i have problem with tree structure saving the data, here is my model for categories. model Category { id Int @id @default(autoincrement()) name String children Category[]…
fadhli
  • 1
  • 1
0
votes
0 answers

Define firebase json structure nested list

I want to create a database structure for my realtime database in firebase. Right now I have list and those list have sublist. Those sublist have products and users. To get the users in a sublist I defined his own object "SubListUser" : { …
0
votes
1 answer

How to do recursive lookups while preserving duplicates in MongoDB

I have a mongo db like this: db.templates.insertMany( [ { _id: 1, uuid: "1", name: "t1", related_templates: [ "2", "2" ] }, { _id: 2, uuid: "2", name: "t2", related_templates: [ "3", "3" ] }, { _id: 3, uuid: "3", name: "t3",…
0
votes
1 answer

How can I filter data without loading it first?

I am using nestjs-typeorm and want to filter out nested data based on some reference. The code loads the whole database first and then filters the required result. How can I filter out the required data without loading entire table of the database…
0
votes
0 answers

Sharding a MongoDB database having a Tree Structure

I have a MongoDB collection having a Tree Structure and need to use sharding. I couldn't find anything specific to Tree Structures in the documentation on Sharding. If anybody can let me know how to approach this, that'd be great. Thank you.
0
votes
1 answer

SQL Server trigger (I need to move through a hierarchical tree structure from any given node)

Good day I have a legacy database that was designed for a specific front end application. I am doing multiples cases of additional app development using this data however, the legacy database has proven inadequate to work with going into the future.…
0
votes
1 answer

Instead of dotted line,Can we use solid line in JS TREE?

I want to use a solid line in the JS Tree structure instead of the dotted line. Refer Screenshot I can remove dotted line using the following code $('#html').jstree().hide_dots(); But I want to change it from dotted to solid. Is there any way for…
Nagaraj Juro
  • 109
  • 10
0
votes
0 answers

I need to recursively check a dynamic Tree Structure in Javascript

I need your help. So the goal this time is that i want to recursively check my tree structure. Basically this is what i need it to do: On the on side i have a so called treeNode (example: 'Article.Artnr') and on the other a so called contextEntry…
OTRAY
  • 115
  • 2
  • 11
0
votes
0 answers

Create File explorer in Angular dynamically with springboot backend(SFTP,get folderstructure and pass to angular)

I used this link - https://stackblitz.com/edit/angular-file-explorer My issue is they hardcoded the Folder structure where the root Folders are created with constant but my Folder structure is dynamic with multiple sub directories which I am SFTPing…
0
votes
1 answer

How to build a tree json in javascript

I am playing around with D3 charts. One of the examples they provide is a chart to draw a tree structure (https://observablehq.com/@d3/tidy-tree) I took this chart and embeded in Power BI as per example here…
Macin
  • 391
  • 2
  • 6
  • 20
0
votes
0 answers

Indenting a tree file structure from string input

Click here to see a screenshot of the assignment Here is how the Navigation.csv looks like, where I take data from https://pastebin.com/JXnaRTzi <-- Click on the link for code - this is my code so far, I am reading the file and making objects from…
0
votes
0 answers

How to normalize database with tree structure MYSQL

I want to organize my Mangas, each Manga will have many Chapters, each Chapter will have many pages, between 20 pages. Tree : Mangas -> Chapters -> Pages. I want to add the Manga, instead, add each Chapter with many Pages to the manga created. How…
Braian Silva
  • 1,986
  • 1
  • 15
  • 21
0
votes
0 answers

Tree Structure with recursive variadic template

I'm trying to make a tree structure to manage data whose structure can change depending on the type. Here is what I did for the base object //Type1.. are the types of the leaves having Base as common parent enum class…
Teloze
  • 279
  • 2
  • 8