mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-19 06:02:52 +00:00
# Which Problems Are Solved - Typos - Punctuation - Markdown table formatting - ... (A bunch of issues my editor gave) # How the Problems Are Solved # Additional Changes # Additional Context
22 lines
443 B
Go
22 lines
443 B
Go
package database
|
|
|
|
// Order represents a SQL condition.
|
|
// It's written after the ORDER BY keyword in a SQL statement.
|
|
type Order interface {
|
|
Write(builder *StatementBuilder)
|
|
}
|
|
|
|
type orderBy struct {
|
|
column Column
|
|
}
|
|
|
|
func OrderBy(column Column) Order {
|
|
return &orderBy{column: column}
|
|
}
|
|
|
|
// Write implements [Order].
|
|
func (o *orderBy) Write(builder *StatementBuilder) {
|
|
builder.WriteString(" ORDER BY ")
|
|
o.column.WriteQualified(builder)
|
|
}
|