MCPcopy
hub / github.com/dosco/graphjin / RenderValArrayColumn

Method RenderValArrayColumn

core/internal/dialect/sqlite.go:442–450  ·  view source on GitHub ↗
(ctx Context, ex *qcode.Exp, table string, pid int32)

Source from the content-addressed store, hash-verified

440}
441
442func (d *SQLiteDialect) RenderValArrayColumn(ctx Context, ex *qcode.Exp, table string, pid int32) {
443 ctx.WriteString(`SELECT value FROM json_each(`)
444 t := table
445 if pid >= 0 {
446 t = fmt.Sprintf("%s_%d", table, pid)
447 }
448 ctx.ColWithTable(t, ex.Right.Col.Name)
449 ctx.WriteString(`)`)
450}
451
452func (d *SQLiteDialect) RenderArray(ctx Context, items []string) {
453 ctx.WriteString(`json_array(`)

Callers

nothing calls this directly

Calls 2

WriteStringMethod · 0.65
ColWithTableMethod · 0.65

Tested by

no test coverage detected