diff options
Diffstat (limited to 'vendor/github.com/uptrace/bun/schema/sqlfmt.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/schema/sqlfmt.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/vendor/github.com/uptrace/bun/schema/sqlfmt.go b/vendor/github.com/uptrace/bun/schema/sqlfmt.go index a4ed24af6..7b4a9493f 100644 --- a/vendor/github.com/uptrace/bun/schema/sqlfmt.go +++ b/vendor/github.com/uptrace/bun/schema/sqlfmt.go @@ -27,7 +27,19 @@ func (s Safe) AppendQuery(fmter Formatter, b []byte) ([]byte, error) { //------------------------------------------------------------------------------ -// Ident represents a SQL identifier, for example, table or column name. +// Name represents a single SQL name, for example, a column name. +type Name string + +var _ QueryAppender = (*Name)(nil) + +func (s Name) AppendQuery(fmter Formatter, b []byte) ([]byte, error) { + return fmter.AppendName(b, string(s)), nil +} + +//------------------------------------------------------------------------------ + +// Ident represents a SQL identifier, for example, +// a fully qualified column name such as `table_name.col_name`. type Ident string var _ QueryAppender = (*Ident)(nil) |