pgArrayPath writes the JSON path in PostgreSQL array text[] format: '{a,1,b}'.
(b *sql.Builder)
| 586 | |
| 587 | // pgArrayPath writes the JSON path in PostgreSQL array text[] format: '{a,1,b}'. |
| 588 | func (p *PathOptions) pgArrayPath(b *sql.Builder) { |
| 589 | b.WriteString("'{") |
| 590 | for i, s := range p.Path { |
| 591 | if i > 0 { |
| 592 | b.Comma() |
| 593 | } |
| 594 | if idx, ok := isJSONIdx(s); ok { |
| 595 | s = idx |
| 596 | } |
| 597 | b.WriteString(s) |
| 598 | } |
| 599 | b.WriteString("}'") |
| 600 | } |
| 601 | |
| 602 | // ParsePath parses the "dotpath" for the DotPath option. |
| 603 | // |
no test coverage detected