I want to save html table header as graph. My question is
1. Is it possible to calculate rowspan and colspan using only AQL? For
example, using edge attribute.
2. How to do numbering for final result? For example, {"index": i + 1}
Attachment:
- result.json : The final result json should look like.
- columns.json: All columns (Nodes)
- table1-columns.json: Table1 columns (Edges)
table1:
Graph({edges: "table1-columns", fromCollections: "columns", toCollections:
"columns"})
My pseudo query:
LET index = 0
FOR v,e,p IN 1..10 OUTBOUND "columns/0"
GRAPH "table1"
/* FILTER p.vertices[2].id != 2 */
index = index + 1
SORT LENGTH(p.vertices)-1,v.id
RETURN {
"index": index,
"id": v.id,
"title": v.title,
"row": LENGTH(p.vertices)-1,
"root": p.vertices[1].id,
"rowspan": rowspan,
"colspan": colspan
}
Thank you
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
columns.json
Description: application/json
result.json
Description: application/json
| A | M | ||||||
|---|---|---|---|---|---|---|---|
| B | C | N | O | ||||
| D | E | F | G | ||||
| H | I | J | K | L | |||
table1-columns.json
Description: application/json
