Add support for expression in OFFSET clause.

This commit is contained in:
go-jet 2024-02-13 14:01:13 +01:00
parent dab153a739
commit 255f4a8eaf
9 changed files with 113 additions and 23 deletions

View file

@ -74,7 +74,6 @@ func newSelectStatement(table ReadableTable, projections []Projection) SelectSta
newSelect.From.Tables = []jet.Serializer{table}
}
newSelect.Limit.Count = -1
newSelect.Offset.Count = -1
newSelect.ShareLock.Name = "LOCK IN SHARE MODE"
newSelect.ShareLock.InNewLine = true
@ -141,7 +140,7 @@ func (s *selectStatementImpl) LIMIT(limit int64) SelectStatement {
}
func (s *selectStatementImpl) OFFSET(offset int64) SelectStatement {
s.Offset.Count = offset
s.Offset.Count = Int(offset)
return s
}