Skip to content

Commit 570da09

Browse files
author
maxtaran2010
committed
fix: correct typos in sqlite catalog function names and comments
- RAMDOM → RANDOM and RAMDOMBLOB → RANDOMBLOB in sqlite/stdlib.go: these misspellings caused sqlc to not recognize SQLite's RANDOM() and RANDOMBLOB() built-in functions in queries - prepand → prepend in codegen/golang/struct.go (comment) - unsiged → unsigned in codegen/golang/opts/override.go (comment) - simpliest → simplest in compiler/selector.go (comment) - Overides → Overrides in protos/plugin/codegen.proto (comment)
1 parent 22d878a commit 570da09

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

internal/codegen/golang/opts/override.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type Override struct {
2828
// True if the GoType should override if the matching type is nullable
2929
Nullable bool `json:"nullable" yaml:"nullable"`
3030

31-
// True if the GoType should override if the matching type is unsiged.
31+
// True if the GoType should override if the matching type is unsigned.
3232
Unsigned bool `json:"unsigned" yaml:"unsigned"`
3333

3434
// Deprecated. Use the `nullable` property instead

internal/codegen/golang/struct.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func StructName(name string, options *opts.Options) string {
4343
}
4444
}
4545

46-
// If a name has a digit as its first char, prepand an underscore to make it a valid Go name.
46+
// If a name has a digit as its first char, prepend an underscore to make it a valid Go name.
4747
r, _ := utf8.DecodeRuneInString(out.String())
4848
if unicode.IsDigit(r) {
4949
return "_" + out.String()

internal/compiler/selector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type selector interface {
1414
ColumnExpr(name string, column *Column) string
1515
}
1616

17-
// defaultSelector is a selector implementation that does the simpliest possible
17+
// defaultSelector is a selector implementation that does the simplest possible
1818
// pass through when generating column expressions. Its use is suitable for all
1919
// database engines not requiring additional customization.
2020
type defaultSelector struct{}

internal/engine/sqlite/stdlib.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,12 +670,12 @@ func defaultSchema(name string) *catalog.Schema {
670670
ReturnType: &ast.TypeName{Name: "text"},
671671
},
672672
{
673-
Name: "RAMDOM",
673+
Name: "RANDOM",
674674
Args: []*catalog.Argument{},
675675
ReturnType: &ast.TypeName{Name: "integer"},
676676
},
677677
{
678-
Name: "RAMDOMBLOB",
678+
Name: "RANDOMBLOB",
679679
Args: []*catalog.Argument{
680680
{
681681
Type: &ast.TypeName{Name: "integer"},

protos/plugin/codegen.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ message File {
1313

1414
message Settings {
1515
// Rename message was field 5
16-
// Overides message was field 6
16+
// Overrides message was field 6
1717
// PythonCode message was field 8
1818
// KotlinCode message was field 9
1919
// GoCode message was field 10;

0 commit comments

Comments
 (0)