/
githubmirror
/
sqlc
Обзор
Документация
Войти
/
githubmirror
/
sqlc
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/sql/ast/sql_value_function.go
39 строк
780 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 SQLValueFunction struct { Xpr Node Op SQLValueFunctionOp Type Oid Typmod int32 Location int } func (n *SQLValueFunction) Pos() int { return n.Location } func (n *SQLValueFunction) Format(buf *TrackedBuffer, d format.Dialect) { if n == nil { return } switch n.Op { case SVFOpCurrentDate: buf.WriteString("CURRENT_DATE") case SVFOpCurrentTime: case SVFOpCurrentTimeN: case SVFOpCurrentTimestamp: case SVFOpCurrentTimestampN: case SVFOpLocaltime: case SVFOpLocaltimeN: case SVFOpLocaltimestamp: case SVFOpLocaltimestampN: case SVFOpCurrentRole: case SVFOpCurrentUser: case SVFOpUser: case SVFOpSessionUser: case SVFOpCurrentCatalog: case SVFOpCurrentSchema: } }