Skip to content

Commit e68d5e3

Browse files
committed
add oct to registry
1 parent a873c87 commit e68d5e3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sql/expression/function/oct.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"github.com/dolthub/go-mysql-server/sql/types"
2222
)
2323

24-
// Oct function provides a string representation for the octal value of N, where N is a decimal number.
24+
// Oct function provides a string representation for the octal value of N, where N is a decimal (base 10) number.
2525
type Oct struct {
2626
n sql.Expression
2727
}
@@ -39,7 +39,7 @@ func (o *Oct) FunctionName() string {
3939

4040
// Description implements sql.FunctionExpression.
4141
func (o *Oct) Description() string {
42-
return "returns a string representation for octal value of N, where N is a decimal number."
42+
return "returns a string representation for octal value of N, where N is a decimal (base 10) number."
4343
}
4444

4545
// Type implements the Expression interface.

sql/expression/function/registry.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ var BuiltIns = []sql.Function{
184184
sql.Function1{Name: "ntile", Fn: window.NewNTile},
185185
sql.FunctionN{Name: "now", Fn: NewNow},
186186
sql.Function2{Name: "nullif", Fn: NewNullIf},
187+
sql.Function1{Name: "oct", Fn: NewOct},
187188
sql.Function1{Name: "octet_length", Fn: NewLength},
188189
sql.Function1{Name: "ord", Fn: NewOrd},
189190
sql.Function0{Name: "pi", Fn: NewPi},

0 commit comments

Comments
 (0)