mirror of
https://github.com/hanzoai/sqlbuilder.git
synced 2026-10-01 00:37:42 +00:00
Add some in-code documentation
This commit is contained in:
@@ -468,6 +468,10 @@ func (sb *SelectBuilder) BuildWithFlavor(flavor Flavor, initialArg ...interface{
|
||||
buf.WriteString(sb.offsetVar)
|
||||
}
|
||||
case Presto:
|
||||
// There might be a hidden constraint in Presto requiring offset to be set before limit.
|
||||
// The select statement documentation (https://prestodb.io/docs/current/sql/select.html)
|
||||
// puts offset before limit, and Trino, which is based on Presto, seems
|
||||
// to require this specific order.
|
||||
if len(sb.offsetVar) > 0 {
|
||||
buf.WriteLeadingString("OFFSET ")
|
||||
buf.WriteString(sb.offsetVar)
|
||||
|
||||
Reference in New Issue
Block a user