/
githubmirror
/
sqlc
Обзор
Документация
Войти
/
githubmirror
/
sqlc
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/sql/ast/a_indices.go
32 строки
503 B
Kyle Gray
refactor(ast): rename Formatter interface to Dialect (#4208)
01 дек 2025, 04:49
Не верифицирован
01 дек 2025, 04:49
ebd32cf
Код
Авторство
О чём код?
package ast import "github.com/sqlc-dev/sqlc/internal/sql/format" type A_Indices struct { IsSlice bool Lidx Node Uidx Node } func (n *A_Indices) Pos() int { return 0 } func (n *A_Indices) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } buf.WriteString("[") if n.IsSlice { if set(n.Lidx) { buf.astFormat(n.Lidx, d) } buf.WriteString(":") if set(n.Uidx) { buf.astFormat(n.Uidx, d) } } else { buf.astFormat(n.Uidx, d) } buf.WriteString("]") }