Skip to content

Commit f2141f8

Browse files
committed
comment
1 parent 47dc967 commit f2141f8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

internal/engine/sqlite/convert.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ func (c *cc) convertOrderby_stmtContext(n parser.IOrder_by_stmtContext) *ast.Lis
648648
continue
649649
}
650650

651+
// Sort direction: ASC, DESC, or default
651652
sortByDir := ast.SortByDirDefault
652653
if adNode := term.Asc_desc(); adNode != nil {
653654
if adNode.ASC_() != nil {
@@ -657,6 +658,7 @@ func (c *cc) convertOrderby_stmtContext(n parser.IOrder_by_stmtContext) *ast.Lis
657658
}
658659
}
659660

661+
// Nulls ordering: NULLS FIRST, NULLS LAST, or default
660662
sortByNulls := ast.SortByNullsDefault
661663
if term.NULLS_() != nil {
662664
if term.FIRST_() != nil {
@@ -864,7 +866,7 @@ func (c *cc) convertUnaryExpr(n *parser.Expr_unaryContext) ast.Node {
864866
if opCtx.MINUS() != nil {
865867
// Negative number: -expr
866868
return &ast.A_Expr{
867-
Name: &ast.List{Items: []ast.Node{&ast.String{Str: "-"}}},
869+
Name: &ast.List{Items: []ast.Node{&ast.String{Str: "-"}}},
868870
Rexpr: expr,
869871
}
870872
}
@@ -875,7 +877,7 @@ func (c *cc) convertUnaryExpr(n *parser.Expr_unaryContext) ast.Node {
875877
if opCtx.TILDE() != nil {
876878
// Bitwise NOT: ~expr
877879
return &ast.A_Expr{
878-
Name: &ast.List{Items: []ast.Node{&ast.String{Str: "~"}}},
880+
Name: &ast.List{Items: []ast.Node{&ast.String{Str: "~"}}},
879881
Rexpr: expr,
880882
}
881883
}
@@ -1373,4 +1375,3 @@ func (c *cc) convert(node node) ast.Node {
13731375
return todo("convert(case=default)", n)
13741376
}
13751377
}
1376-

0 commit comments

Comments
 (0)